OSDN Git Service

Type safe version of MachinePassRegistry
authorSerge Guelton <sguelton@quarkslab.com>
Fri, 9 Nov 2018 17:19:45 +0000 (17:19 +0000)
committerSerge Guelton <sguelton@quarkslab.com>
Fri, 9 Nov 2018 17:19:45 +0000 (17:19 +0000)
commitbbe5fdb08d283c9fc5db19410caf0efc08fb53df
treeb456175a293ad0d7f8ec400fa52d12953ebdd767
parentd32f7814bc9a415d2ff3d6afe235ec82faf0db87
Type safe version of MachinePassRegistry

Previous version used type erasure through a `void* (*)()` pointer,
which triggered gcc warning and implied a lot of reinterpret_cast.

This version should make it harder to hit ourselves in the foot.

Differential revision: https://reviews.llvm.org/D54203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346522 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachinePassRegistry.h
include/llvm/CodeGen/MachineScheduler.h
include/llvm/CodeGen/RegAllocRegistry.h
include/llvm/CodeGen/SchedulerRegistry.h
lib/CodeGen/MachinePassRegistry.cpp
lib/CodeGen/MachineScheduler.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/TargetPassConfig.cpp