]> granicus.if.org Git - clang/commitdiff
NFC: Remove MANGLE_CHECKER from ItaniumMangle.cpp
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 23 Oct 2018 19:55:38 +0000 (19:55 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 23 Oct 2018 19:55:38 +0000 (19:55 +0000)
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

lib/AST/ItaniumMangle.cpp
lib/AST/Mangle.cpp

index e99549850acd6e3893bee4cd96a6f5074aad8d53..4b726337425362f9484007a07e315ea5e605aa80 100644 (file)
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 
-#define MANGLE_CHECKER 0
-
-#if MANGLE_CHECKER
-#include <cxxabi.h>
-#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; }
index b0e5146e81943c490ea9ac5c44c259aae2757053..bb29bffc1b8fb221f9a5653693d6a87ff724d18d 100644 (file)
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 
-#define MANGLE_CHECKER 0
-
-#if MANGLE_CHECKER
-#include <cxxabi.h>
-#endif
-
 using namespace clang;
 
 // FIXME: For blocks we currently mimic GCC's mangling scheme, which leaves