llvm/test/MC/AsmParser/equ.s
Weiming Zhao b76e6a781e [AsmParser] Diagnose empty symbol for .set directive
Summary: Diagnose empty symbol to avoid hitting assertion in MCContext::getOrCreateSymbol

Reviewers: eli.friedman, rengolin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 18:00:36 +00:00

11 lines
235 B
ArmAsm

// RUN: not llvm-mc -n -triple i386-unknown-unknown %s 2> %t
// RUN: FileCheck < %t %s
.equ a, 0
.set a, 1
.equ a, 2
.equiv a, 3
.set b, ""
// CHECK: error: redefinition of 'a'
// CHECK: error: missing expression in '.set' directive