Add explicit keywords.
[oota-llvm.git] / include / llvm / Analysis / AliasAnalysis.h
index eff29719c72dfc534b16fdb739f2a6520f3376b7..42094167052a613c1b6a949ad89902123bf5e2ea 100644 (file)
@@ -31,7 +31,8 @@
 #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 {
 
@@ -39,6 +40,8 @@ class LoadInst;
 class StoreInst;
 class VAArgInst;
 class TargetData;
+class Pass;
+class AnalysisUsage;
 
 class AliasAnalysis {
 protected:
@@ -58,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
 
@@ -178,7 +182,7 @@ public:
 
       /// CallsThrough - Indirect calls are made through the specified function
       /// pointer.
-      CallsThrough,
+      CallsThrough
     };
   };
 
@@ -256,7 +260,7 @@ public:
     return getModRefInfo(CallSite(I), P, Size);
   }
   ModRefResult getModRefInfo(VAArgInst* I, Value* P, unsigned Size) {
-    return AliasAnalysis::Mod;
+    return AliasAnalysis::ModRef;
   }
   ModRefResult getModRefInfo(Instruction *I, Value *P, unsigned Size) {
     switch (I->getOpcode()) {
@@ -316,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