RecordDecl *RD = Ty->getDecl();
// Get overall information about the record type for the debug info.
- llvm::DIFile *DefUnit = getOrCreateFile(RD->getLocation());
- const unsigned Line =
- getLineNumber(RD->getLocation().isValid() ? RD->getLocation() : CurLoc);
StringRef RDName = getClassName(RD);
+ const SourceLocation Loc = RD->getLocation();
+ llvm::DIFile *DefUnit = nullptr;
+ unsigned Line = 0;
+ if (Loc.isValid()) {
+ DefUnit = getOrCreateFile(Loc);
+ Line = getLineNumber(Loc);
+ }
llvm::DIScope *RDContext = getDeclContextDescriptor(RD);
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -o - %s | \
// RUN: FileCheck %s -check-prefix=CHECK -check-prefix=SSE -check-prefix=NO-AVX512
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | \
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -o - %s -target-feature +avx | \
// RUN: FileCheck %s -check-prefix=CHECK -check-prefix=AVX -check-prefix=NO-AVX512
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx512f | \
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -o - %s -target-feature +avx512f | \
// RUN: FileCheck %s -check-prefix=CHECK -check-prefix=AVX -check-prefix=AVX512
#include <stdarg.h>
// AVX: @f65(<8 x float> %{{[^,)]+}})
void f65(struct t65 a0) {
}
+
+/// The synthesized __va_list_tag does not have file/line fields.
+// CHECK: = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__va_list_tag",
+// CHECK-NOT: file:
+// CHECK-NOT: line:
+// CHECK-SAME: size: