Move VerifierSupport into namespace llvm.
authorDaniel Jasper <djasper@google.com>
Fri, 16 Dec 2016 13:53:46 +0000 (13:53 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 16 Dec 2016 13:53:46 +0000 (13:53 +0000)
It currently is in an unnamed namespace and then it shouldn't be used
from something in the header file. This actually triggers a warning with
GCC:
../include/llvm/IR/Verifier.h:39:7: warning: ‘llvm::TBAAVerifier’ has a field ‘llvm::TBAAVerifier::Diagnostic’ whose type uses the anonymous namespace [enabled by default]

llvm-svn: 289942

llvm/include/llvm/IR/Verifier.h
llvm/lib/IR/Verifier.cpp

index e5a98d8..be983e4 100644 (file)
 
 #include "llvm/IR/PassManager.h"
 
-namespace {
-struct VerifierSupport;
-}
-
 namespace llvm {
 
 class Function;
@@ -34,6 +30,7 @@ class FunctionPass;
 class ModulePass;
 class Module;
 class raw_ostream;
+struct VerifierSupport;
 
 /// Verify that the TBAA Metadatas are valid.
 class TBAAVerifier {
index 7b2b1c4..2b9dfce 100644 (file)
@@ -117,7 +117,7 @@ using namespace llvm;
 
 static cl::opt<bool> VerifyDebugInfo("verify-debug-info", cl::init(true));
 
-namespace {
+namespace llvm {
 
 struct VerifierSupport {
   raw_ostream *OS;
@@ -248,6 +248,10 @@ public:
   }
 };
 
+} // namespace llvm
+
+namespace {
+
 class Verifier : public InstVisitor<Verifier>, VerifierSupport {
   friend class InstVisitor<Verifier>;