From c114ed711eca29e735e10956883a1010c22d7942 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Fri, 7 Aug 2009 22:46:00 +0000 Subject: Added Mac OS X assembler style conditional assembly. I may come back and see if I can clean this up a bit more and do way with the TheCondState and just use the top element on the TheCondStack if not empty. Also may tweak the code around ParseConditionalAssemblyDirectives() to simplify the AsmParser code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78423 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/AsmParser/conditional_asm.s | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/MC/AsmParser/conditional_asm.s (limited to 'test/MC/AsmParser/conditional_asm.s') diff --git a/test/MC/AsmParser/conditional_asm.s b/test/MC/AsmParser/conditional_asm.s new file mode 100644 index 0000000000..f619ef9bb4 --- /dev/null +++ b/test/MC/AsmParser/conditional_asm.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc -triple i386-unknown-unknown %s -I %p | FileCheck %s + +# CHECK: .byte 2 +.if 1+2 + .if 1-1 + .byte 1 + .elseif 2+2 + .byte 1+1 + .else + .byte 0 + .endif +.endif -- cgit v1.2.3