Clean up the use of static and anonymous namespaces. This turned up
[oota-llvm.git] / lib / Analysis / IPA / GlobalsModRef.cpp
index 880298ec020d62bed1826716d36069d80004aa11..6d6282029aee4f28588227cf7599207d0cfa7619 100644 (file)
@@ -115,11 +115,12 @@ namespace {
     /// case the most generic behavior of this function should be returned.
     virtual ModRefBehavior getModRefBehavior(Function *F, CallSite CS,
                                          std::vector<PointerAccessInfo> *Info) {
-      if (FunctionRecord *FR = getFunctionInfo(F))
+      if (FunctionRecord *FR = getFunctionInfo(F)) {
         if (FR->FunctionEffect == 0)
           return DoesNotAccessMemory;
         else if ((FR->FunctionEffect & Mod) == 0)
           return OnlyReadsMemory;
+      }
       return AliasAnalysis::getModRefBehavior(F, CS, Info);
     }
 
@@ -145,13 +146,13 @@ namespace {
                               GlobalValue *OkayStoreDest = 0);
     bool AnalyzeIndirectGlobalMemory(GlobalValue *GV);
   };
-
-  char GlobalsModRef::ID = 0;
-  RegisterPass<GlobalsModRef> X("globalsmodref-aa",
-                                "Simple mod/ref analysis for globals");
-  RegisterAnalysisGroup<AliasAnalysis> Y(X);
 }
 
+char GlobalsModRef::ID = 0;
+static RegisterPass<GlobalsModRef>
+X("globalsmodref-aa", "Simple mod/ref analysis for globals", false, true);
+static RegisterAnalysisGroup<AliasAnalysis> Y(X);
+
 Pass *llvm::createGlobalsModRefPass() { return new GlobalsModRef(); }
 
 /// getUnderlyingObject - This traverses the use chain to figure out what object