diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-06-16 17:14:38 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-06-16 17:14:38 +0000 |
commit | 1e85ef645d388a8900320b81c0e6e8afb8804b06 (patch) | |
tree | f4813425a83d2cedb0231cd45c06a8d20e104e24 /test/Assembler | |
parent | 23b0766b47464030d6a406eabeb5f27ae491b682 (diff) | |
download | external_llvm-1e85ef645d388a8900320b81c0e6e8afb8804b06.zip external_llvm-1e85ef645d388a8900320b81c0e6e8afb8804b06.tar.gz external_llvm-1e85ef645d388a8900320b81c0e6e8afb8804b06.tar.bz2 |
Add testcase for r133050 which added support for printing and parsing escaped
names for named metadata nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r-- | test/Assembler/named-metadata.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Assembler/named-metadata.ll b/test/Assembler/named-metadata.ll new file mode 100644 index 0000000..db72810 --- /dev/null +++ b/test/Assembler/named-metadata.ll @@ -0,0 +1,24 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +!0 = metadata !{metadata !"zero"} +!1 = metadata !{metadata !"one"} +!2 = metadata !{metadata !"two"} + +!foo = !{!0, !1, !2} +; CHECK: !foo = !{!0, !1, !2} + +!\23pragma = !{!0, !1, !2} +; CHECK: !\23pragma = !{!0, !1, !2} + +; \31 is the digit '1'. On emission, we escape the first character (to avoid +; conflicting with anonymous metadata), but not the subsequent ones. +!\31\31\31 = !{!0, !1, !2} +; CHECK: !\3111 = !{!0, !1, !2} + +!\22name\22 = !{!0, !1, !2} +; CHECK: !\22name\22 = !{!0, !1, !2} + +; \x doesn't mean anything, so we parse it literally but escape the \ into \5C +; when emitting it, followed by xfoo. +!\xfoo = !{!0, !1, !2} +; CHECK: !\5Cxfoo = !{!0, !1, !2} |