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 | 1d643efabc21a6da369ea06bbd8c28e37fff8534 (patch) | |
| tree | 62588576e04ee646c377944b25518ffb8405f3be /llvm | |
| parent | b29f52727c5b42d2825afbdd4759b81136266e0e (diff) | |
| download | bcm5719-llvm-1d643efabc21a6da369ea06bbd8c28e37fff8534.tar.gz bcm5719-llvm-1d643efabc21a6da369ea06bbd8c28e37fff8534.zip | |
Add testcase for r133050 which added support for printing and parsing escaped
names for named metadata nodes.
llvm-svn: 133166
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/Assembler/named-metadata.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Assembler/named-metadata.ll b/llvm/test/Assembler/named-metadata.ll new file mode 100644 index 00000000000..db728108ac9 --- /dev/null +++ b/llvm/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} |

