[llvm] r289942 - Move VerifierSupport into namespace llvm.

Daniel Jasper via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 05:53:46 PST 2016


Author: djasper
Date: Fri Dec 16 07:53:46 2016
New Revision: 289942

URL: http://llvm.org/viewvc/llvm-project?rev=289942&view=rev
Log:
Move VerifierSupport into namespace llvm.

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]

Modified:
    llvm/trunk/include/llvm/IR/Verifier.h
    llvm/trunk/lib/IR/Verifier.cpp

Modified: llvm/trunk/include/llvm/IR/Verifier.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Verifier.h?rev=289942&r1=289941&r2=289942&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Verifier.h (original)
+++ llvm/trunk/include/llvm/IR/Verifier.h Fri Dec 16 07:53:46 2016
@@ -23,10 +23,6 @@
 
 #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 {

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=289942&r1=289941&r2=289942&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Fri Dec 16 07:53:46 2016
@@ -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>;
 




More information about the llvm-commits mailing list