Fix PR1395, by passing the ID correctly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-05-06 23:13:56 +00:00
parent 4d396b1a47
commit 1ce6f8da72
3 changed files with 4 additions and 5 deletions

View File

@ -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);
};

View File

@ -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

View File

@ -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