summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Assembler/invalid-mdlocalvariable-null-scope.ll4
-rw-r--r--llvm/test/Assembler/invalid-mdlocation-null-scope.ll4
-rw-r--r--llvm/test/CodeGen/Generic/dbg_value.ll2
-rw-r--r--llvm/test/CodeGen/X86/dbg-changes-codegen.ll4
4 files changed, 11 insertions, 3 deletions
diff --git a/llvm/test/Assembler/invalid-mdlocalvariable-null-scope.ll b/llvm/test/Assembler/invalid-mdlocalvariable-null-scope.ll
new file mode 100644
index 00000000000..53ee94de79b
--- /dev/null
+++ b/llvm/test/Assembler/invalid-mdlocalvariable-null-scope.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK: <stdin>:[[@LINE+1]]:30: error: 'scope' cannot be null
+!0 = !MDLocalVariable(scope: null)
diff --git a/llvm/test/Assembler/invalid-mdlocation-null-scope.ll b/llvm/test/Assembler/invalid-mdlocation-null-scope.ll
new file mode 100644
index 00000000000..e359c9fe424
--- /dev/null
+++ b/llvm/test/Assembler/invalid-mdlocation-null-scope.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK: <stdin>:[[@LINE+1]]:25: error: 'scope' cannot be null
+!0 = !MDLocation(scope: null)
diff --git a/llvm/test/CodeGen/Generic/dbg_value.ll b/llvm/test/CodeGen/Generic/dbg_value.ll
index c5200d7837c..f2f3a3f2c79 100644
--- a/llvm/test/CodeGen/Generic/dbg_value.ll
+++ b/llvm/test/CodeGen/Generic/dbg_value.ll
@@ -11,4 +11,4 @@ define void @t(%0*, i32, i32, i32, i32) nounwind {
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
; !0 should conform to the format of DIVariable.
-!0 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "a", arg: 0, scope: null)
+!0 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "a", arg: 0, scope: !MDSubprogram())
diff --git a/llvm/test/CodeGen/X86/dbg-changes-codegen.ll b/llvm/test/CodeGen/X86/dbg-changes-codegen.ll
index 6cdfdc25019..e50967dc830 100644
--- a/llvm/test/CodeGen/X86/dbg-changes-codegen.ll
+++ b/llvm/test/CodeGen/X86/dbg-changes-codegen.ll
@@ -78,6 +78,6 @@ attributes #2 = { nounwind readnone }
!17 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: null)
!45 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: null)
-!62 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "arg", line: 4, arg: 2, scope: null, type: !17)
+!62 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "arg", line: 4, arg: 2, scope: !MDSubprogram(), type: !17)
!64 = !{%struct.Flibble* undef}
-!65 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 13, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: null, type: !45)
+!65 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 13, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !MDSubprogram(), type: !45)
OpenPOWER on IntegriCloud