From 1ab6f2fa7a38a12d8f20157d71e5280a253f2578 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 9 Sep 2010 22:42:59 +0000 Subject: llvm-mc: Don't crash when using -n and we see a directive before the initial section. - This is annoying, because we have to scatter this check everywhere that could emit real data, but I see no better solution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113552 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/AsmParser/dash-n.s | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/MC/AsmParser/dash-n.s (limited to 'test') diff --git a/test/MC/AsmParser/dash-n.s b/test/MC/AsmParser/dash-n.s new file mode 100644 index 0000000000..b6243a4a01 --- /dev/null +++ b/test/MC/AsmParser/dash-n.s @@ -0,0 +1,7 @@ +// RUN: not llvm-mc -n -triple i386-unknown-unknown %s 2> %t +// RUN: FileCheck < %t %s + +.globl a +// CHECK: error: expected section directive before assembly directive +.long 0 + -- cgit v1.2.3