Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
index 61fa85c..482ada9 100644
--- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
@@ -30,6 +30,9 @@
/// modifies the CFG!
class VISIBILITY_HIDDEN LowerSwitch : public FunctionPass {
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+ LowerSwitch() : FunctionPass((intptr_t) &ID) {}
+
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -75,6 +78,7 @@
}
};
+ const int LowerSwitch::ID = 0;
RegisterPass<LowerSwitch>
X("lowerswitch", "Lower SwitchInst's to branches");
}