mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Fix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
rework. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
39706e68a5
commit
171eee5471
@ -20,6 +20,7 @@
|
|||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
|
#include "llvm/Analysis/CallGraph.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -55,13 +56,26 @@ namespace {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void print(std::ostream &OS) const {}
|
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
RegisterAnalysis<ExternalFunctionsPassedConstants>
|
RegisterAnalysis<ExternalFunctionsPassedConstants>
|
||||||
P2("externalfnconstants", "Print external fn callsites passed constants");
|
P1("externalfnconstants", "Print external fn callsites passed constants");
|
||||||
|
|
||||||
|
struct CallGraphPrinter : public ModulePass {
|
||||||
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
|
AU.setPreservesAll();
|
||||||
|
AU.addRequired<CallGraph>();
|
||||||
|
}
|
||||||
|
virtual bool runOnModule(Module &M) { return false; }
|
||||||
|
|
||||||
|
void print(std::ostream &OS, Module *M) const {
|
||||||
|
getAnalysis<CallGraph>().print(OS, M);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
RegisterAnalysis<CallGraphPrinter>
|
||||||
|
P2("callgraph", "Print a call graph");
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
|
#include "llvm/Analysis/CallGraph.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -55,13 +56,26 @@ namespace {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void print(std::ostream &OS) const {}
|
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
RegisterAnalysis<ExternalFunctionsPassedConstants>
|
RegisterAnalysis<ExternalFunctionsPassedConstants>
|
||||||
P2("externalfnconstants", "Print external fn callsites passed constants");
|
P1("externalfnconstants", "Print external fn callsites passed constants");
|
||||||
|
|
||||||
|
struct CallGraphPrinter : public ModulePass {
|
||||||
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
|
AU.setPreservesAll();
|
||||||
|
AU.addRequired<CallGraph>();
|
||||||
|
}
|
||||||
|
virtual bool runOnModule(Module &M) { return false; }
|
||||||
|
|
||||||
|
void print(std::ostream &OS, Module *M) const {
|
||||||
|
getAnalysis<CallGraph>().print(OS, M);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
RegisterAnalysis<CallGraphPrinter>
|
||||||
|
P2("callgraph", "Print a call graph");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user