diff options
Diffstat (limited to 'build/build-clang/return-empty-string-non-mangled.patch')
-rw-r--r-- | build/build-clang/return-empty-string-non-mangled.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build/build-clang/return-empty-string-non-mangled.patch b/build/build-clang/return-empty-string-non-mangled.patch new file mode 100644 index 000000000..33a391703 --- /dev/null +++ b/build/build-clang/return-empty-string-non-mangled.patch @@ -0,0 +1,19 @@ +Author: Michael Wu <mwu@mozilla.com> +Date: Thu Sep 24 11:36:08 2015 -0400 + + Return an empty string when a symbol isn't mangled + +diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp +--- a/clang/tools/libclang/CIndex.cpp ++++ b/clang/tools/libclang/CIndex.cpp +@@ -3990,6 +3990,10 @@ + ASTContext &Ctx = ND->getASTContext(); + std::unique_ptr<MangleContext> MC(Ctx.createMangleContext()); + ++ // Don't mangle if we don't need to. ++ if (!MC->shouldMangleCXXName(ND)) ++ return cxstring::createEmpty(); ++ + std::string FrontendBuf; + llvm::raw_string_ostream FrontendBufOS(FrontendBuf); + if (MC->shouldMangleDeclName(ND)) { |