1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[MC][PowerPC] Fix a crash when redefining a symbol after .set

Fix PR44284. This is probably not valid assembly but we should not crash.

Reviewed By: luporl, #powerpc, steven.zhang

Differential Revision: https://reviews.llvm.org/D71443
This commit is contained in:
Fangrui Song 2019-12-12 16:18:57 -08:00
parent 70244eebaf
commit c95b1c8cf0
2 changed files with 7 additions and 1 deletions

View File

@ -201,7 +201,8 @@ public:
void finish() override {
for (auto *Sym : UpdateOther)
copyLocalEntry(Sym, Sym->getVariableValue());
if (Sym->isVariable())
copyLocalEntry(Sym, Sym->getVariableValue());
}
private:

View File

@ -32,3 +32,8 @@ func:
nop
nop
.localentry func, 8
## PR44284 Don't crash if err is redefined after .set
.set err, _err
.globl err
err: