diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-12-02 00:22:25 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-12-02 00:22:25 +0000 |
| commit | 4b00d3b55a38262e8115eaac9c802e909565dbe9 (patch) | |
| tree | 78277cb4baea70509f6223d2fc16af21d32b6c74 /clang/lib | |
| parent | 451d1b1d272e8d177f0d9e05f763c88da0ac2cb7 (diff) | |
| download | bcm5719-llvm-4b00d3b55a38262e8115eaac9c802e909565dbe9.tar.gz bcm5719-llvm-4b00d3b55a38262e8115eaac9c802e909565dbe9.zip | |
Eliminate two uses of NDEBUG in headers that cause different symbols
to be available in debug vs. release builds.
llvm-svn: 120629
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/DeclBase.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 14 |
2 files changed, 2 insertions, 16 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 7d8a92530e0..843e907dea9 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -424,8 +424,8 @@ SourceLocation Decl::getBodyRBrace() const { return SourceLocation(); } -#ifndef NDEBUG void Decl::CheckAccessDeclContext() const { +#ifndef NDEBUG // Suppress this check if any of the following hold: // 1. this is the translation unit (and thus has no parent) // 2. this is a template parameter (and thus doesn't belong to its context) @@ -449,9 +449,9 @@ void Decl::CheckAccessDeclContext() const { assert(Access != AS_none && "Access specifier is AS_none inside a record decl"); +#endif } -#endif //===----------------------------------------------------------------------===// // DeclContext Implementation diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 7679bf82441..547a70a7a58 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -726,20 +726,6 @@ const UnresolvedSetImpl *CXXRecordDecl::getVisibleConversionFunctions() { return &data().VisibleConversions; } -#ifndef NDEBUG -void CXXRecordDecl::CheckConversionFunction(NamedDecl *ConvDecl) { - assert(ConvDecl->getDeclContext() == this && - "conversion function does not belong to this record"); - - ConvDecl = ConvDecl->getUnderlyingDecl(); - if (FunctionTemplateDecl *Temp = dyn_cast<FunctionTemplateDecl>(ConvDecl)) { - assert(isa<CXXConversionDecl>(Temp->getTemplatedDecl())); - } else { - assert(isa<CXXConversionDecl>(ConvDecl)); - } -} -#endif - void CXXRecordDecl::removeConversion(const NamedDecl *ConvDecl) { // This operation is O(N) but extremely rare. Sema only uses it to // remove UsingShadowDecls in a class that were followed by a direct |

