Add explicit keywords.
[oota-llvm.git] / include / llvm / Analysis / AliasAnalysis.h
index c63d9908e22d24d7444815921f602d86a69bfd7a..42094167052a613c1b6a949ad89902123bf5e2ea 100644 (file)
 #define LLVM_ANALYSIS_ALIAS_ANALYSIS_H
 
 #include "llvm/Support/CallSite.h"
-#include "llvm/Pass.h"    // Need this for IncludeFile
+#include "llvm/System/IncludeFile.h"
+#include <vector>
 
 namespace llvm {
 
 class LoadInst;
 class StoreInst;
+class VAArgInst;
 class TargetData;
+class Pass;
+class AnalysisUsage;
 
 class AliasAnalysis {
 protected:
@@ -57,6 +61,7 @@ protected:
   virtual void getAnalysisUsage(AnalysisUsage &AU) const;
 
 public:
+  static char ID; // Class identification, replacement for typeinfo
   AliasAnalysis() : TD(0), AA(0) {}
   virtual ~AliasAnalysis();  // We want to be subclassed
 
@@ -177,7 +182,7 @@ public:
 
       /// CallsThrough - Indirect calls are made through the specified function
       /// pointer.
-      CallsThrough,
+      CallsThrough
     };
   };
 
@@ -254,8 +259,12 @@ public:
   ModRefResult getModRefInfo(InvokeInst *I, Value *P, unsigned Size) {
     return getModRefInfo(CallSite(I), P, Size);
   }
+  ModRefResult getModRefInfo(VAArgInst* I, Value* P, unsigned Size) {
+    return AliasAnalysis::ModRef;
+  }
   ModRefResult getModRefInfo(Instruction *I, Value *P, unsigned Size) {
     switch (I->getOpcode()) {
+    case Instruction::VAArg:  return getModRefInfo((VAArgInst*)I, P, Size);
     case Instruction::Load:   return getModRefInfo((LoadInst*)I, P, Size);
     case Instruction::Store:  return getModRefInfo((StoreInst*)I, P, Size);
     case Instruction::Call:   return getModRefInfo((CallInst*)I, P, Size);
@@ -311,14 +320,13 @@ public:
   }
 };
 
+} // End llvm namespace
+
 // Because of the way .a files work, we must force the BasicAA implementation to
 // be pulled in if the AliasAnalysis header is included.  Otherwise we run
 // the risk of AliasAnalysis being used, but the default implementation not
 // being linked into the tool that uses it.
-//
-extern void BasicAAStub();
-static IncludeFile HDR_INCLUDE_BASICAA_CPP((void*)&BasicAAStub);
-
-} // End llvm namespace
+FORCE_DEFINING_FILE_TO_BE_LINKED(AliasAnalysis)
+FORCE_DEFINING_FILE_TO_BE_LINKED(BasicAliasAnalysis)
 
 #endif