summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 23:13:56 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 23:13:56 +0000
commit1ce6f8da7283a1f281f1767905873537d66560d5 (patch)
tree03c24e77a64d0799f38c647eb5f8bb218401cd1f /lib
parent4d396b1a47621f336fe92fb80b5238284bbe89e7 (diff)
downloadllvm-1ce6f8da7283a1f281f1767905873537d66560d5.tar.gz
llvm-1ce6f8da7283a1f281f1767905873537d66560d5.tar.bz2
llvm-1ce6f8da7283a1f281f1767905873537d66560d5.tar.xz
Fix PR1395, by passing the ID correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp1
-rw-r--r--lib/Transforms/IPO/Inliner.cpp5
-rw-r--r--lib/Transforms/IPO/Inliner.h3
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index 0367adc2ac..14c19c9d68 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -54,6 +54,7 @@ namespace {
class VISIBILITY_HIDDEN SimpleInliner : public Inliner {
std::map<const Function*, FunctionInfo> CachedFunctionInfo;
public:
+ SimpleInliner() : Inliner(&ID) {}
static char ID; // Pass identification, replacement for typeid
int getInlineCost(CallSite CS);
};
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index cd204a7433..dd749c2ffc 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -36,9 +36,8 @@ namespace {
cl::desc("Control the amount of inlining to perform (default = 200)"));
}
-char Inliner::ID = 0;
-Inliner::Inliner()
- : CallGraphSCCPass((intptr_t)&ID), InlineThreshold(InlineLimit) {}
+Inliner::Inliner(const void *ID)
+ : CallGraphSCCPass((intptr_t)ID), InlineThreshold(InlineLimit) {}
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should
diff --git a/lib/Transforms/IPO/Inliner.h b/lib/Transforms/IPO/Inliner.h
index 80be81a1e9..cc58259373 100644
--- a/lib/Transforms/IPO/Inliner.h
+++ b/lib/Transforms/IPO/Inliner.h
@@ -27,8 +27,7 @@ namespace llvm {
/// perform the inlining operations that does not depend on the policy.
///
struct Inliner : public CallGraphSCCPass {
- static char ID;
- Inliner();
+ Inliner(const void *ID);
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should