summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Assembler/invalid-mdglobalvariable-empty-name.ll4
-rw-r--r--llvm/test/Assembler/invalid-mdglobalvariable-missing-name.ll4
-rw-r--r--llvm/test/Assembler/mdglobalvariable.ll4
3 files changed, 10 insertions, 2 deletions
diff --git a/llvm/test/Assembler/invalid-mdglobalvariable-empty-name.ll b/llvm/test/Assembler/invalid-mdglobalvariable-empty-name.ll
new file mode 100644
index 00000000000..77a9f4d773e
--- /dev/null
+++ b/llvm/test/Assembler/invalid-mdglobalvariable-empty-name.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK: <stdin>:[[@LINE+1]]:30: error: 'name' cannot be empty
+!0 = !MDGlobalVariable(name: "")
diff --git a/llvm/test/Assembler/invalid-mdglobalvariable-missing-name.ll b/llvm/test/Assembler/invalid-mdglobalvariable-missing-name.ll
new file mode 100644
index 00000000000..d57d71e2d95
--- /dev/null
+++ b/llvm/test/Assembler/invalid-mdglobalvariable-missing-name.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK: <stdin>:[[@LINE+1]]:24: error: missing required field 'name'
+!0 = !MDGlobalVariable()
diff --git a/llvm/test/Assembler/mdglobalvariable.ll b/llvm/test/Assembler/mdglobalvariable.ll
index d48fef93cda..2726f4f3510 100644
--- a/llvm/test/Assembler/mdglobalvariable.ll
+++ b/llvm/test/Assembler/mdglobalvariable.ll
@@ -17,8 +17,8 @@
file: !2, line: 7, type: !3, isLocal: true,
isDefinition: false, variable: i32* @foo)
-; CHECK: !6 = !MDGlobalVariable(scope: !0, isLocal: false, isDefinition: true)
-!6 = !MDGlobalVariable(scope: !0)
+; CHECK: !6 = !MDGlobalVariable(name: "foo", scope: !0, isLocal: false, isDefinition: true)
+!6 = !MDGlobalVariable(name: "foo", scope: !0)
!7 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Class", size: 8, align: 8)
!8 = !MDDerivedType(tag: DW_TAG_member, name: "mem", flags: DIFlagStaticMember, scope: !7, baseType: !3)
OpenPOWER on IntegriCloud