xref: /llvm-project/llvm/test/MC/AsmParser/macro-same-context.ll (revision a1b4e13cff2a792571927ee1fc6eebb05e40fae9)
1;; Test that macros in inline assembly blocks share the same context,
2;; thus a definition is available to the whole file. PR36110
3; UNSUPPORTED: target={{.*}}-zos{{.*}},target=nvptx{{.*}}
4; RUN: not llc < %s 2>&1 | FileCheck %s
5; REQUIRES: default_triple
6
7define void @test() {
8  call void asm sideeffect ".macro FOO\0A.endm", "~{dirflag},~{fpsr},~{flags}"() #1
9  call void asm sideeffect ".macro FOO\0A.endm", "~{dirflag},~{fpsr},~{flags}"() #1
10; CHECK: error: macro 'FOO' is already defined
11  ret void
12}
13