Make BasicAliasAnalysis correctly register itself. Patch by Devang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2007-06-18 17:13:29 +00:00
parent 7a0a4fc912
commit 03265f98a3

View File

@ -38,6 +38,7 @@ namespace {
struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
static char ID; // Class identification, replacement for typeinfo
NoAA() : ImmutablePass((intptr_t)&ID) {}
NoAA(intptr_t PID) : ImmutablePass(PID) { }
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetData>();
@ -93,6 +94,7 @@ namespace {
/// derives from the NoAA class.
struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
static char ID; // Class identification, replacement for typeinfo
BasicAliasAnalysis() : NoAA((intptr_t)&ID) { }
AliasResult alias(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size);