simplify AnalysisGroup registration, eliminating one typeid call.
llvm-svn: 29932
diff --git a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
index 859f596..7e1f5cc 100644
--- a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -37,7 +37,7 @@
RegisterPass<FunctionProfiler> X("insert-function-profiling",
"Insert instrumentation for function profiling");
- RegisterAnalysisGroup<RSProfilers, FunctionProfiler> XG;
+ RegisterAnalysisGroup<RSProfilers> XG(X);
}
@@ -83,7 +83,7 @@
RegisterPass<BlockProfiler> Y("insert-block-profiling",
"Insert instrumentation for block profiling");
- RegisterAnalysisGroup<RSProfilers, BlockProfiler> YG;
+ RegisterAnalysisGroup<RSProfilers> YG(Y);
}
ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
index 984190a..54a9ef7 100644
--- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -89,7 +89,7 @@
static RegisterAnalysisGroup<RSProfilers> A("Profiling passes");
static RegisterPass<NullProfilerRS> NP("insert-null-profiling-rs",
"Measure profiling framework overhead");
- static RegisterAnalysisGroup<RSProfilers, NullProfilerRS, true> NPT;
+ static RegisterAnalysisGroup<RSProfilers, true> NPT(NP);
/// Chooser - Something that chooses when to make a sample of the profiled code
class Chooser {