summaryrefslogtreecommitdiffstats
path: root/build/build-clang/return-empty-string-non-mangled.patch
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /build/build-clang/return-empty-string-non-mangled.patch
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'build/build-clang/return-empty-string-non-mangled.patch')
-rw-r--r--build/build-clang/return-empty-string-non-mangled.patch19
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)) {