From 878b0578efd47effcf4bc43ef7f9e5b1da005b0b Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 16 Dec 2016 13:53:46 +0000 Subject: [PATCH] Move VerifierSupport into namespace llvm. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289942 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Verifier.h | 5 +---- lib/IR/Verifier.cpp | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/llvm/IR/Verifier.h b/include/llvm/IR/Verifier.h index e5a98d86fd5..be983e49bab 100644 --- a/include/llvm/IR/Verifier.h +++ b/include/llvm/IR/Verifier.h @@ -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 { diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 7b2b1c49700..2b9dfcea2fb 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -117,7 +117,7 @@ using namespace llvm; static cl::opt 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, VerifierSupport { friend class InstVisitor; -- 2.49.0