Clean up the use of static and anonymous namespaces. This turned up
[oota-llvm.git] / lib / CodeGen / ShadowStackCollector.cpp
index 092671ce562f379b99331918400f1cef30b0244f..568fe44c30ec6e31a1b253c21f6ac5b447d1508a 100644 (file)
@@ -66,11 +66,14 @@ namespace {
     static GetElementPtrInst *CreateGEP(IRBuilder &B, Value *BasePtr,
                                         int Idx1, int Idx2, const char *Name);
   };
+
+}
   
-  CollectorRegistry::Add<ShadowStackCollector>
-  Y("shadow-stack",
-    "Very portable collector for uncooperative code generators");
+static CollectorRegistry::Add<ShadowStackCollector>
+Y("shadow-stack",
+  "Very portable collector for uncooperative code generators");
   
+namespace {
   /// EscapeEnumerator - This is a little algorithm to find all escape points
   /// from a function so that "finally"-style code can be inserted. In addition
   /// to finding the existing return and unwind instructions, it also (if