diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2018-11-09 17:19:45 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2018-11-09 17:19:45 +0000 |
commit | 86f8b70f1b7c3f92266197d580f6d86414650997 (patch) | |
tree | 64e0ce36a5039e01903fc8f147ffc1a3170e9cf7 /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | c44c174246280dc7614b6591f48010858f482eb9 (diff) | |
download | bcm5719-llvm-86f8b70f1b7c3f92266197d580f6d86414650997.tar.gz bcm5719-llvm-86f8b70f1b7c3f92266197d580f6d86414650997.zip |
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
llvm-svn: 346522
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 9ab405f38d4..d4b9f851599 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -240,7 +240,8 @@ void PostMachineScheduler::getAnalysisUsage(AnalysisUsage &AU) const { MachineFunctionPass::getAnalysisUsage(AU); } -MachinePassRegistry MachineSchedRegistry::Registry; +MachinePassRegistry<MachineSchedRegistry::ScheduleDAGCtor> + MachineSchedRegistry::Registry; /// A dummy default scheduler factory indicates whether the scheduler /// is overridden on the command line. |