mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
Add assembler fatal error for undefined assembler labels in COFF writer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
45acd3e931
commit
cba458eecc
@ -710,6 +710,11 @@ void WinCOFFObjectWriter::recordRelocation(
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
Twine("symbol '") + A.getName() +
|
||||
"' can not be undefined");
|
||||
if (A.isTemporary() && A.isUndefined()) {
|
||||
Asm.getContext().reportFatalError(Fixup.getLoc(),
|
||||
Twine("assembler label '") + A.getName() +
|
||||
"' can not be undefined");
|
||||
}
|
||||
|
||||
MCSection *Section = Fragment->getParent();
|
||||
|
||||
|
4
test/MC/COFF/label-undefined.s
Normal file
4
test/MC/COFF/label-undefined.s
Normal file
@ -0,0 +1,4 @@
|
||||
// RUN: not llvm-mc -filetype=obj -triple i386-pc-win32 %s 2>&1 | FileCheck %s
|
||||
// CHECK: assembler label 'Lundefined' can not be undefined
|
||||
.text
|
||||
movl Lundefined, %eax
|
Loading…
x
Reference in New Issue
Block a user