diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:32:09 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:32:09 +0000 |
| commit | e146000565c86e7cd70d746a64084f1ea3a7528e (patch) | |
| tree | 2e1ffeb85e0cca419b5e63bb4ad3481e958cc9bf /llvm/test/Assembler | |
| parent | 06a0702e4033573be42105bc51bbfeff628a00da (diff) | |
| download | bcm5719-llvm-e146000565c86e7cd70d746a64084f1ea3a7528e.tar.gz bcm5719-llvm-e146000565c86e7cd70d746a64084f1ea3a7528e.zip | |
AsmWriter/Bitcode: MDNamespace
llvm-svn: 229018
Diffstat (limited to 'llvm/test/Assembler')
| -rw-r--r-- | llvm/test/Assembler/invalid-mdnamespace-missing-namespace.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Assembler/mdnamespace.ll | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/Assembler/invalid-mdnamespace-missing-namespace.ll b/llvm/test/Assembler/invalid-mdnamespace-missing-namespace.ll new file mode 100644 index 00000000000..da2f5114221 --- /dev/null +++ b/llvm/test/Assembler/invalid-mdnamespace-missing-namespace.ll @@ -0,0 +1,4 @@ +; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s + +; CHECK: [[@LINE+1]]:36: error: missing required field 'scope' +!0 = !MDNamespace(name: "Namespace") diff --git a/llvm/test/Assembler/mdnamespace.ll b/llvm/test/Assembler/mdnamespace.ll new file mode 100644 index 00000000000..205ee04ba7d --- /dev/null +++ b/llvm/test/Assembler/mdnamespace.ll @@ -0,0 +1,16 @@ +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s +; RUN: verify-uselistorder %s + +; CHECK: !named = !{!0, !1, !2, !3, !4, !4} +!named = !{!0, !1, !2, !3, !4, !5} + +!0 = distinct !{} +!1 = !{!"path/to/file", !"/path/to/dir"} +!2 = !MDFile(filename: "path/to/file", directory: "/path/to/dir") + +; CHECK: !3 = !MDNamespace(scope: !0, file: !2, name: "Namespace", line: 7) +!3 = !MDNamespace(scope: !0, file: !2, name: "Namespace", line: 7) + +; CHECK: !4 = !MDNamespace(scope: !0) +!4 = !MDNamespace(scope: !0, file: null, name: "", line: 0) +!5 = !MDNamespace(scope: !0) |

