summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/PruneEH.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/IPO/PruneEH.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/IPO/PruneEH.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/PruneEH.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp
index 6040379d58e..ee37992d163 100644
--- a/llvm/lib/Transforms/IPO/PruneEH.cpp
+++ b/llvm/lib/Transforms/IPO/PruneEH.cpp
@@ -35,6 +35,9 @@ STATISTIC(NumUnreach, "Number of noreturn calls optimized");
namespace {
struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ PruneEH() : CallGraphSCCPass((intptr_t)&ID) {}
+
/// DoesNotUnwind - This set contains all of the functions which we have
/// determined cannot unwind.
std::set<CallGraphNode*> DoesNotUnwind;
@@ -49,6 +52,8 @@ namespace {
bool SimplifyFunction(Function *F);
void DeleteBasicBlock(BasicBlock *BB);
};
+
+ const int PruneEH::ID = 0;
RegisterPass<PruneEH> X("prune-eh", "Remove unused exception handling info");
}
OpenPOWER on IntegriCloud