summaryrefslogtreecommitdiff
path: root/test/MC/AsmParser/conditional_asm.s
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2009-08-07 22:46:00 +0000
committerKevin Enderby <enderby@apple.com>2009-08-07 22:46:00 +0000
commitc114ed711eca29e735e10956883a1010c22d7942 (patch)
tree9e171faa5b534c3cc797fd27b7d40caeacc003a7 /test/MC/AsmParser/conditional_asm.s
parentb124be4f979acb8b3584de392bf28786fd8a5e76 (diff)
downloadllvm-c114ed711eca29e735e10956883a1010c22d7942.tar.gz
llvm-c114ed711eca29e735e10956883a1010c22d7942.tar.bz2
llvm-c114ed711eca29e735e10956883a1010c22d7942.tar.xz
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
Diffstat (limited to 'test/MC/AsmParser/conditional_asm.s')
-rw-r--r--test/MC/AsmParser/conditional_asm.s12
1 files changed, 12 insertions, 0 deletions
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