mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
[WebAssembly][lld] Don't mark a file live from an undefine symbol
Live symbols should only cause the files in which they are defined to become live. For now this is only tested in emscripten: we're continuing to work on reducing the test case further for an lld-style unit test. Differential Revision: https://reviews.llvm.org/D93472
This commit is contained in:
parent
e1fd202489
commit
cb77e877f8
@ -137,7 +137,7 @@ bool Symbol::isLive() const {
|
||||
|
||||
void Symbol::markLive() {
|
||||
assert(!isDiscarded());
|
||||
if (file != NULL)
|
||||
if (file != NULL && isDefined())
|
||||
file->markLive();
|
||||
if (auto *g = dyn_cast<DefinedGlobal>(this))
|
||||
g->global->live = true;
|
||||
|
Loading…
Reference in New Issue
Block a user