From: Erik Pilkington Date: Tue, 23 Oct 2018 19:55:38 +0000 (+0000) Subject: NFC: Remove MANGLE_CHECKER from ItaniumMangle.cpp X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb5b6f7f24bf9fa8942ed1159e435bd5482fb136;p=clang NFC: Remove MANGLE_CHECKER from ItaniumMangle.cpp This hasn't even compiled since 2011. It would be useful to have some test to verify that ItaniumMangle and ItaniumDemangle agree, but this isn't it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345075 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp index e99549850a..4b72633742 100644 --- a/lib/AST/ItaniumMangle.cpp +++ b/lib/AST/ItaniumMangle.cpp @@ -33,12 +33,6 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#define MANGLE_CHECKER 0 - -#if MANGLE_CHECKER -#include -#endif - using namespace clang; namespace { @@ -415,17 +409,6 @@ public: SeqID(Outer.SeqID), FunctionTypeDepth(Outer.FunctionTypeDepth), AbiTagsRoot(AbiTags), Substitutions(Outer.Substitutions) {} -#if MANGLE_CHECKER - ~CXXNameMangler() { - if (Out.str()[0] == '\01') - return; - - int status = 0; - char *result = abi::__cxa_demangle(Out.str().str().c_str(), 0, 0, &status); - assert(status == 0 && "Could not demangle mangled name!"); - free(result); - } -#endif raw_ostream &getStream() { return Out; } void disableDerivedAbiTags() { DisableDerivedAbiTags = true; } diff --git a/lib/AST/Mangle.cpp b/lib/AST/Mangle.cpp index b0e5146e81..bb29bffc1b 100644 --- a/lib/AST/Mangle.cpp +++ b/lib/AST/Mangle.cpp @@ -25,12 +25,6 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#define MANGLE_CHECKER 0 - -#if MANGLE_CHECKER -#include -#endif - using namespace clang; // FIXME: For blocks we currently mimic GCC's mangling scheme, which leaves