Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / lib / Transforms / Scalar / ScalarReplAggregates.cpp
index 71007d29fe38d0cc8633c33e3beb8cbfa70e34ca..da5488be762661d094b8dd867e336ba34cc7c455 100644 (file)
@@ -47,6 +47,9 @@ STATISTIC(NumGlobals,   "Number of allocas copied from constant global");
 
 namespace {
   struct VISIBILITY_HIDDEN SROA : public FunctionPass {
+    static const int ID; // Pass identifcation, replacement for typeid
+    SROA() : FunctionPass((intptr_t)&ID) {}
+
     bool runOnFunction(Function &F);
 
     bool performScalarRepl(Function &F);
@@ -81,6 +84,7 @@ namespace {
     static Instruction *isOnlyCopiedFromConstantGlobal(AllocationInst *AI);
   };
 
+  const int SROA::ID = 0;
   RegisterPass<SROA> X("scalarrepl", "Scalar Replacement of Aggregates");
 }