use different name for parameter to make it clear that we set DIDescriptor::GV
[oota-llvm.git] / lib / Analysis / AliasDebugger.cpp
index d9da70d52162d6075165d12d22001ab70239ba73..0bbd739351fe9c29751d77d396d97880f6e69b57 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Andrew Lenharth and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Analysis/AliasAnalysis.h"
+#include "llvm/Support/Compiler.h"
 #include <set>
 using namespace llvm;
 
 namespace {
   
-  class AliasDebugger : public ModulePass, public AliasAnalysis {
+  class VISIBILITY_HIDDEN AliasDebugger 
+      : public ModulePass, public AliasAnalysis {
 
     //What we do is simple.  Keep track of every value the AA could
     //know about, and verify that queries are one of those.
@@ -38,6 +40,9 @@ namespace {
     std::set<const Value*> Vals;
     
   public:
+    static char ID; // Class identification, replacement for typeinfo
+    AliasDebugger() : ModulePass(&ID) {}
+
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);                 // set up super class
 
@@ -116,10 +121,12 @@ namespace {
     }
 
   };
-
-  RegisterPass<AliasDebugger> X("debug-aa", "AA use debugger");
-  RegisterAnalysisGroup<AliasAnalysis> Y(X);
 }
 
+char AliasDebugger::ID = 0;
+static RegisterPass<AliasDebugger>
+X("debug-aa", "AA use debugger", false, true);
+static RegisterAnalysisGroup<AliasAnalysis> Y(X);
+
 Pass *llvm::createAliasDebugger() { return new AliasDebugger(); }