Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix PR1395, by passing the ID correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36894 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed May 6, 2007
1 parent 4d396b1 commit 1ce6f8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/Transforms/IPO/InlineSimple.cpp
Expand Up @@ -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);
};
Expand Down
5 changes: 2 additions & 3 deletions lib/Transforms/IPO/Inliner.cpp
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/Transforms/IPO/Inliner.h
Expand Up @@ -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
Expand Down

0 comments on commit 1ce6f8d

Please sign in to comment.