summaryrefslogtreecommitdiffstats
path: root/lld/wasm/Driver.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-11-09 16:57:41 +0000
committerSam Clegg <sbc@chromium.org>2018-11-09 16:57:41 +0000
commit37125f080fa59ac0556ea1b4eb43e9841dd02284 (patch)
tree4190ebdb96c9128c26b2749a59789ef865b058d0 /lld/wasm/Driver.cpp
parent4f2e66c0184baeccf43d08217c70efcd92674311 (diff)
downloadbcm5719-llvm-37125f080fa59ac0556ea1b4eb43e9841dd02284.tar.gz
bcm5719-llvm-37125f080fa59ac0556ea1b4eb43e9841dd02284.zip
[WebAssembly] Respect `--no-mangle` in more locations
`--no-demangle` now also applies to the name section. This change was motivated by the rust team that have a slightly different name mangling scheme to the standard C++ itanium one and prefer to do their de-mangling as a post-link setp. Patch by Alex Crichton! Differential Revision: https://reviews.llvm.org/D54279 llvm-svn: 346516
Diffstat (limited to 'lld/wasm/Driver.cpp')
-rw-r--r--lld/wasm/Driver.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index acdb5f93f15..d9060939646 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -310,10 +310,8 @@ static void handleWeakUndefines() {
// Add a synthetic dummy for weak undefined functions. These dummies will
// be GC'd if not used as the target of any "call" instructions.
- Optional<std::string> SymName = demangleItanium(Sym->getName());
- StringRef DebugName =
- Saver.save("undefined function " +
- (SymName ? StringRef(*SymName) : Sym->getName()));
+ std::string SymName = toString(*Sym);
+ StringRef DebugName = Saver.save("undefined function " + SymName);
SyntheticFunction *Func =
make<SyntheticFunction>(Sig, Sym->getName(), DebugName);
Func->setBody(UnreachableFn);
OpenPOWER on IntegriCloud