From f86b8392d989560ffe58ff2eb15699a03e145c5f Mon Sep 17 00:00:00 2001 From: Erik Pilkington Date: Tue, 23 Oct 2018 19:55:38 +0000 Subject: [PATCH] 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. llvm-svn: 345075 --- clang/lib/AST/ItaniumMangle.cpp | 17 ----------------- clang/lib/AST/Mangle.cpp | 6 ------ 2 files changed, 23 deletions(-) diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index e995498..4b72633 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/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/clang/lib/AST/Mangle.cpp b/clang/lib/AST/Mangle.cpp index b0e5146..bb29bff 100644 --- a/clang/lib/AST/Mangle.cpp +++ b/clang/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 -- 2.7.4