diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-02-16 10:11:29 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-02-16 10:11:29 +0000 |
commit | 08f6e35d6fdf32da14ad058748728c560c7556ac (patch) | |
tree | 2fafed868fcb05309a2b68408df6111ad15da484 /test/MC | |
parent | a1b3df34e9efd6b17978356eb26b2c8f7286db4d (diff) |
Merging r325139:
------------------------------------------------------------------------
r325139 | rafael | 2018-02-14 17:34:27 +0100 (Wed, 14 Feb 2018) | 12 lines
Store defined macros in MCContext.
So that macros defined in inline assembly blocks are available to the
whole file.
This provides a consistent behavior with other assembly directives,
since equations for example are already preserved between inline
assembly blocks.
PR: 36110
Patch by Roger!
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/AsmParser/inline_macro_duplication.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/MC/AsmParser/inline_macro_duplication.ll b/test/MC/AsmParser/inline_macro_duplication.ll new file mode 100644 index 00000000000..9d7e22fde7b --- /dev/null +++ b/test/MC/AsmParser/inline_macro_duplication.ll @@ -0,0 +1,8 @@ +; RUN: not llc < %s 2>&1 | FileCheck %s + +define void @test() { + call void asm sideeffect ".macro FOO\0A.endm", "~{dirflag},~{fpsr},~{flags}"() #1 + call void asm sideeffect ".macro FOO\0A.endm", "~{dirflag},~{fpsr},~{flags}"() #1 +; CHECK: error: macro 'FOO' is already defined + ret void +} |