summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ADCE.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-05-01 21:15:47 +0000
committerDevang Patel <dpatel@apple.com>2007-05-01 21:15:47 +0000
commit09f162ca6a10446d6377b957f3a58ac92ce38306 (patch)
treeb41e816449956582e447ab616707e1afbf1a88fe /llvm/lib/Transforms/Scalar/ADCE.cpp
parenta612049dd849d1e659eeaeefbcf82147af7f669f (diff)
downloadbcm5719-llvm-09f162ca6a10446d6377b957f3a58ac92ce38306.tar.gz
bcm5719-llvm-09f162ca6a10446d6377b957f3a58ac92ce38306.zip
Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/ADCE.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp
index 3946f5707cd..75e9d2f61b5 100644
--- a/llvm/lib/Transforms/Scalar/ADCE.cpp
+++ b/llvm/lib/Transforms/Scalar/ADCE.cpp
@@ -52,6 +52,9 @@ class VISIBILITY_HIDDEN ADCE : public FunctionPass {
// The public interface for this class
//
public:
+ static const int ID; // Pass identifcation, replacement for typeid
+ ADCE() : FunctionPass((intptr_t)&ID) {}
+
// Execute the Aggressive Dead Code Elimination Algorithm
//
virtual bool runOnFunction(Function &F) {
@@ -104,6 +107,7 @@ private:
}
};
+ const int ADCE::ID = 0;
RegisterPass<ADCE> X("adce", "Aggressive Dead Code Elimination");
} // End of anonymous namespace
OpenPOWER on IntegriCloud