DebugInfo: Adapt to loss of DITypeRef in LLVM r267296
LLVM stopped using MDString-based type references, and DIBuilder no
longer fills 'retainedTypes:' with every DICompositeType that has an
'identifier:' field. There are just minor changes to keep the same
behaviour in CFE.
Leaving 'retainedTypes:' unfilled has a dramatic impact on the output
order of the IR though. There are a huge number of testcase changes,
which were unfortunately not really scriptable.
llvm-svn: 267297
diff --git a/clang/test/CodeGenCXX/debug-info-varargs.cpp b/clang/test/CodeGenCXX/debug-info-varargs.cpp
index 52bffe6..7afbcd2 100644
--- a/clang/test/CodeGenCXX/debug-info-varargs.cpp
+++ b/clang/test/CodeGenCXX/debug-info-varargs.cpp
@@ -2,13 +2,7 @@
struct A
{
- // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz"
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK-SAME: type: ![[ATY:[0-9]+]]
void a(int c, ...) {}
- // CHECK: ![[ATY]] = !DISubroutineType(types: ![[AARGS:[0-9]+]])
- // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
- // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
};
// CHECK: !DISubprogram(name: "b", linkageName: "_Z1biz"
@@ -18,6 +12,14 @@
// CHECK: ![[BTY]] = !DISubroutineType(types: ![[BARGS:[0-9]+]])
// CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
+ // The subprogram "a" comes after "b" because the function comes later.
+ // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz"
+ // CHECK-SAME: line: 5,
+ // CHECK-SAME: type: ![[ATY:[0-9]+]]
+ // CHECK: ![[ATY]] = !DISubroutineType(types: ![[AARGS:[0-9]+]])
+ // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
+ // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
+
A a;
// CHECK: !DILocalVariable(name: "fptr"