[lld] [lld][WebAssembly] Allow `--trace-symbol` to work with symbols with custom import names (PR #96119)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 01:23:08 PDT 2024
================
@@ -526,6 +535,7 @@ Symbol *SymbolTable::addUndefinedFunction(StringRef name,
printTraceSymbolUndefined(name, file);
auto replaceSym = [&]() {
+ traceImport(importName, file);
----------------
aheejin wrote:
This `replaceSym` also seems to be called when `wasInserted` was not true below:
```cpp
// If the existing undefined functions is not called directly then let
// this one take precedence. Otherwise the existing function is either
// directly called or defined, in which case we need a function variant.
if (existingUndefined && !existingUndefined->isCalledDirectly)
replaceSym();
else if (getFunctionVariant(s, sig, file, &s))
replaceSym();
```
Is that OK to run this again in this case?
https://github.com/llvm/llvm-project/pull/96119
More information about the llvm-commits
mailing list