**-fno-standalone-debug** option can be used to get to turn on the
vtable-based optimization described above.
-.. option:: -fuse-ctor-homing
-
- This optimization is similar to the optimizations that are enabled as part
- of -fno-standalone-debug. Here, Clang only emits type info for a
- non-trivial, non-aggregate C++ class in the modules that contain a
- definition of one of its constructors. This relies on the additional
- assumption that all classes that are not trivially constructible have a
- non-trivial constructor that is used somewhere. The negation,
- -fno-use-ctor-homing, ensures that constructor homing is not used.
-
- This flag is not enabled by default, and needs to be used with -cc1 or
- -Xclang.
-
.. option:: -g
Generate complete debug info.
/// Check if type and variable info should be emitted.
bool hasReducedDebugInfo() const {
- return getDebugInfo() >= codegenoptions::DebugInfoConstructor;
+ return getDebugInfo() >= codegenoptions::LimitedDebugInfo;
}
/// Check if maybe unused type info should be emitted.
/// (-gline-tables-only).
DebugLineTablesOnly,
- /// Limit generated debug info for classes to reduce size. This emits class
- /// type info only where the constructor is emitted, if it is a class that
- /// has a constructor.
- /// FIXME: Consider combining this with LimitedDebugInfo.
- DebugInfoConstructor,
-
/// Limit generated debug info to reduce size (-fno-standalone-debug). This
/// emits forward decls for types that could be replaced with forward decls in
/// the source code. For dynamic C++ classes type info is only emitted into
def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
HelpText<"Disable implicit builtin knowledge of math functions">,
MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>;
-def fno_use_ctor_homing: Flag<["-"], "fno-use-ctor-homing">,
- HelpText<"Don't use constructor homing for debug info">;
-def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">,
- HelpText<"Use constructor homing if we are using limited debug info already">;
-
} // let Flags = [CC1Option, CC1AsOption, NoDriverOption]
let Flags = [CC1Option, NoDriverOption] in {
#include "clang/AST/RecordLayout.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/CodeGenOptions.h"
+#include "clang/Basic/DebugInfoOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Version.h"
case codegenoptions::DebugDirectivesOnly:
EmissionKind = llvm::DICompileUnit::DebugDirectivesOnly;
break;
- case codegenoptions::DebugInfoConstructor:
case codegenoptions::LimitedDebugInfo:
case codegenoptions::FullDebugInfo:
case codegenoptions::UnusedTypeInfo:
// In this debug mode, emit type info for a class when its constructor type
// info is emitted.
- if (DebugKind == codegenoptions::DebugInfoConstructor)
+ if (DebugKind == codegenoptions::LimitedDebugInfo)
if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(Method))
completeUnusedClass(*CD->getParent());
// In constructor homing mode, only emit complete debug info for a class
// when its constructor is emitted.
- if ((DebugKind == codegenoptions::DebugInfoConstructor) &&
+ if ((DebugKind == codegenoptions::LimitedDebugInfo) &&
canUseCtorHoming(CXXDecl))
return true;
}
void CGDebugInfo::completeUnusedClass(const CXXRecordDecl &D) {
- if (DebugKind <= codegenoptions::DebugLineTablesOnly)
+ if (DebugKind <= codegenoptions::DebugLineTablesOnly || D.isDynamicClass())
return;
completeClassData(&D);
#include "clang/Basic/CLWarnings.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/CodeGenOptions.h"
+#include "clang/Basic/DebugInfoOptions.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Version.h"
return codegenoptions::DebugLineTablesOnly;
if (A.getOption().matches(options::OPT_gline_directives_only))
return codegenoptions::DebugDirectivesOnly;
- return codegenoptions::DebugInfoConstructor;
+ return codegenoptions::LimitedDebugInfo;
}
static bool mustUseNonLeafFramePointerForTarget(const llvm::Triple &Triple) {
case codegenoptions::DebugLineTablesOnly:
CmdArgs.push_back("-debug-info-kind=line-tables-only");
break;
- case codegenoptions::DebugInfoConstructor:
- CmdArgs.push_back("-debug-info-kind=constructor");
- break;
case codegenoptions::LimitedDebugInfo:
CmdArgs.push_back("-debug-info-kind=limited");
break;
CmdArgs.push_back(Value.data());
} else {
RenderDebugEnablingArgs(Args, CmdArgs,
- codegenoptions::DebugInfoConstructor,
+ codegenoptions::LimitedDebugInfo,
DwarfVersion, llvm::DebuggerKind::Default);
}
} else if (Value.startswith("-mcpu") || Value.startswith("-mfpu") ||
}
}
if (const Arg *A = Args.getLastArg(options::OPT_g_Group)) {
- DebugInfoKind = codegenoptions::DebugInfoConstructor;
+ DebugInfoKind = codegenoptions::LimitedDebugInfo;
// If the last option explicitly specified a debug-info level, use it.
if (checkDebugInfoOption(A, Args, D, TC) &&
if (checkDebugInfoOption(A, Args, D, TC)) {
if (DebugInfoKind != codegenoptions::DebugLineTablesOnly &&
DebugInfoKind != codegenoptions::DebugDirectivesOnly) {
- DebugInfoKind = codegenoptions::DebugInfoConstructor;
+ DebugInfoKind = codegenoptions::LimitedDebugInfo;
CmdArgs.push_back("-dwarf-ext-refs");
CmdArgs.push_back("-fmodule-format=obj");
}
if (const Arg *A = Args.getLastArg(options::OPT_fstandalone_debug))
(void)checkDebugInfoOption(A, Args, D, TC);
- if (DebugInfoKind == codegenoptions::LimitedDebugInfo ||
- DebugInfoKind == codegenoptions::DebugInfoConstructor) {
+ if (DebugInfoKind == codegenoptions::LimitedDebugInfo) {
if (Args.hasFlag(options::OPT_fno_eliminate_unused_debug_types,
options::OPT_feliminate_unused_debug_types, false))
DebugInfoKind = codegenoptions::UnusedTypeInfo;
// This controls whether or not we perform JustMyCode instrumentation.
if (Args.hasFlag(options::OPT_fjmc, options::OPT_fno_jmc, false)) {
if (TC.getTriple().isOSBinFormatELF()) {
- if (DebugInfoKind >= codegenoptions::DebugInfoConstructor)
+ if (DebugInfoKind >= codegenoptions::LimitedDebugInfo)
CmdArgs.push_back("-fjmc");
else
D.Diag(clang::diag::warn_drv_jmc_requires_debuginfo) << "-fjmc"
options::OPT_gline_tables_only)) {
*EmitCodeView = true;
if (DebugInfoArg->getOption().matches(options::OPT__SLASH_Z7))
- *DebugInfoKind = codegenoptions::DebugInfoConstructor;
+ *DebugInfoKind = codegenoptions::LimitedDebugInfo;
else
*DebugInfoKind = codegenoptions::DebugLineTablesOnly;
} else {
// This controls whether or not we perform JustMyCode instrumentation.
if (Args.hasFlag(options::OPT__SLASH_JMC, options::OPT__SLASH_JMC_,
/*Default=*/false)) {
- if (*EmitCodeView && *DebugInfoKind >= codegenoptions::DebugInfoConstructor)
+ if (*EmitCodeView && *DebugInfoKind >= codegenoptions::LimitedDebugInfo)
CmdArgs.push_back("-fjmc");
else
D.Diag(clang::diag::warn_drv_jmc_requires_debuginfo) << "/JMC"
// the guard for source type, however there is a test which asserts
// that some assembler invocation receives no -debug-info-kind,
// and it's not clear whether that test is just overly restrictive.
- DebugInfoKind = (WantDebug ? codegenoptions::DebugInfoConstructor
+ DebugInfoKind = (WantDebug ? codegenoptions::LimitedDebugInfo
: codegenoptions::NoDebugInfo);
addDebugPrefixMapArg(getToolChain().getDriver(), getToolChain(), Args,
case codegenoptions::DebugDirectivesOnly:
DebugInfoVal = "line-directives-only";
break;
- case codegenoptions::DebugInfoConstructor:
- DebugInfoVal = "constructor";
- break;
case codegenoptions::LimitedDebugInfo:
DebugInfoVal = "limited";
break;
llvm::StringSwitch<unsigned>(A->getValue())
.Case("line-tables-only", codegenoptions::DebugLineTablesOnly)
.Case("line-directives-only", codegenoptions::DebugDirectivesOnly)
- .Case("constructor", codegenoptions::DebugInfoConstructor)
.Case("limited", codegenoptions::LimitedDebugInfo)
.Case("standalone", codegenoptions::FullDebugInfo)
.Case("unused-types", codegenoptions::UnusedTypeInfo)
Opts.setDebugInfo(static_cast<codegenoptions::DebugInfoKind>(Val));
}
- // If -fuse-ctor-homing is set and limited debug info is already on, then use
- // constructor homing, and vice versa for -fno-use-ctor-homing.
- if (const Arg *A =
- Args.getLastArg(OPT_fuse_ctor_homing, OPT_fno_use_ctor_homing)) {
- if (A->getOption().matches(OPT_fuse_ctor_homing) &&
- Opts.getDebugInfo() == codegenoptions::LimitedDebugInfo)
- Opts.setDebugInfo(codegenoptions::DebugInfoConstructor);
- if (A->getOption().matches(OPT_fno_use_ctor_homing) &&
- Opts.getDebugInfo() == codegenoptions::DebugInfoConstructor)
- Opts.setDebugInfo(codegenoptions::LimitedDebugInfo);
- }
-
for (const auto &Arg : Args.getAllArgValues(OPT_fdebug_prefix_map_EQ)) {
auto Split = StringRef(Arg).split('=');
Opts.DebugPrefixMap.insert(
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -emit-llvm -o - -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb %s | FileCheck %s --check-prefixes=CHECK,LIN
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-pc -emit-llvm -o - -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb %s | FileCheck %s --check-prefixes=CHECK,WIN
+// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -emit-llvm -o - -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb %s | FileCheck %s --check-prefixes=CHECK,LIN
+// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-pc -emit-llvm -o - -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb %s | FileCheck %s --check-prefixes=CHECK,WIN
// LIN: @[[S1_NAME:.+]].ifunc = weak_odr ifunc void (%struct.S1*), void (%struct.S1*)* ()* @[[S1_NAME]].resolver
// LIN: @[[S2_NAME:.+]].ifunc = weak_odr ifunc void (%struct.S2*), void (%struct.S2*)* ()* @[[S2_NAME]].resolver
-// RUN: %clang_cc1 -triple i686-w64-windows-gnu -o - -emit-llvm -debug-info-kind=constructor %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-w64-windows-gnu -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s
enum nsresult {};
};
struct E {
- E();
virtual ~E();
virtual void func() {
}
};
struct F {
- struct inner {
+ struct F_inner {
};
static const int i = 2;
virtual ~F();
struct G {
virtual void func();
- struct inner {
+ struct G_inner {
int j;
};
};
x.func();
E y;
int i = F::i;
- F::inner z;
+ F::F_inner z;
K k;
k.func();
L l;
int main(int argc, char **argv) {
B b;
- G::inner c_i;
+ G::G_inner c_i;
if (argc) {
A a;
}
// CHECK-SAME: DIFlagFwdDecl
// CHECK-NOT: identifier:
// CHECK-SAME: ){{$}}
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
+// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
+// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}}
-// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "bar"
// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "baz"
// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
// CHECK-SAME: declaration: [[L_FUNC_DECL]]
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner",{{.*}} line: 50
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G_inner",
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTSN1G5innerE"
+// CHECK-SAME: identifier: "_ZTSN1G7G_innerE"
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
// CHECK-SAME: DIFlagFwdDecl
// CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j"
// CHECK-SAME: baseType: ![[INT]]
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
//
-// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 100,
-// CHECK: ![[RETLOC]] = !DILocation(line: 99,
+// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 99,
+// CHECK: ![[RETLOC]] = !DILocation(line: 98,
+++ /dev/null
-// RUN: %clang_cc1 -debug-info-kind=constructor -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=CTOR_HOMING
-// RUN: %clang_cc1 -debug-info-kind=limited -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=CTOR_HOMING
-// RUN: %clang_cc1 -debug-info-kind=standalone -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=FULL_DEBUG
-// RUN: %clang_cc1 -debug-info-kind=line-tables-only -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=NO_DEBUG
-// RUN: %clang_cc1 -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=NO_DEBUG
-//
-// RUN: %clang_cc1 -debug-info-kind=constructor -fno-use-ctor-homing \
-// RUN: -emit-llvm %s -o - | FileCheck %s -check-prefix=FULL_DEBUG
-
-// This tests that the -fuse-ctor-homing is only used if limited debug info would have
-// been used otherwise.
-
-// CTOR_HOMING: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}flags: DIFlagFwdDecl
-// FULL_DEBUG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue
-// NO_DEBUG-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
-struct A {
- A();
-} TestA;
-// RUN: %clang_cc1 -debug-info-kind=constructor -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue
struct A {
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=limited %s -o - | FileCheck %s
-// Make sure this still works with constructor homing.
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=constructor %s -o - | FileCheck %s
-
// Run again with -gline-tables-only or -gline-directives-only and verify we don't crash. We won't output
// type info at all.
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=line-tables-only %s -o - | FileCheck %s -check-prefix LINES-ONLY
}();
}
-// CHECK: ![[D:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "D",
+// CHECK: ![[D:[0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "D",
// CHECK: ![[POINTER:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[D]], size: 64)
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "this",
// CHECK-SAME: line: 11
// CHECK: ret void
// CHECK: }
-// CHECK: !6 = distinct !DIGlobalVariable(name: "gf", scope: !2, file: !7, line: {{[0-9]+}}, type: !8, isLocal: false, isDefinition: true)
-// CHECK: !8 = !DIBasicType(name: "__ibm128", size: 128, encoding: DW_ATE_float)
+// CHECK: [[GF_TYPE:!.*]] = !DIBasicType(name: "__ibm128", size: 128, encoding: DW_ATE_float)
+// CHECK: = distinct !DIGlobalVariable(name: "gf",
+// CHECK-SAME: type: [[GF_TYPE]],
+// CHECK-SAME: isDefinition: true)
-// RUN: %clang_cc1 -DSETATTR=0 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s --check-prefix=DEBUG
-// RUN: %clang_cc1 -DSETATTR=1 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s --check-prefix=WITHATTR
-// Use -debug-info-kind=constructor because it includes all the optimizations.
+// RUN: %clang_cc1 -DSETATTR=0 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=DEBUG
+// RUN: %clang_cc1 -DSETATTR=1 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=WITHATTR
#if SETATTR
#define STANDALONEDEBUGATTR __attribute__((standalone_debug))
// RUN: %clang_cl /Zi /c -### -- %s 2>&1 | FileCheck -check-prefix=Zi %s
// Zi: "-gcodeview"
-// Zi: "-debug-info-kind=constructor"
+// Zi: "-debug-info-kind=limited"
// RUN: %clang_cl /Z7 /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7 %s
// Z7: "-gcodeview"
-// Z7: "-debug-info-kind=constructor"
+// Z7: "-debug-info-kind=limited"
// RUN: %clang_cl -gline-tables-only /c -### -- %s 2>&1 | FileCheck -check-prefix=ZGMLT %s
// ZGMLT: "-gcodeview"
// which made it "win". This test could not detect that bug.
// RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
// Z7_gdwarf: "-gcodeview"
-// Z7_gdwarf: "-debug-info-kind=constructor"
+// Z7_gdwarf: "-debug-info-kind=limited"
// Z7_gdwarf: "-dwarf-version=
// RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
// CHECK-WITHOUT-G-NOT: -debug-info-kind
-// CHECK-WITH-G: "-debug-info-kind=constructor"
+// CHECK-WITH-G: "-debug-info-kind=limited"
// CHECK-WITH-G: "-dwarf-version=5"
// CHECK-WITH-G-DWARF2: "-dwarf-version=2"
// HAS_DEBUG-NOT: warning: debug
// HAS_DEBUG: "-fcuda-is-device"
-// HAS_DEBUG-SAME: "-debug-info-kind={{constructor|line-tables-only}}"
+// HAS_DEBUG-SAME: "-debug-info-kind={{limited|line-tables-only}}"
// HAS_DEBUG-SAME: "-dwarf-version=2"
// HAS_DEBUG: ptxas
// HAS_DEBUG-SAME: "-g"
// RUN: | FileCheck %s
//
// CHECK: "-cc1as"
-// CHECK: "-debug-info-kind=constructor"
+// CHECK: "-debug-info-kind=limited"
// Check to make sure clang with -g on a .s file gets passed -dwarf-debug-producer.
// rdar://12955296
// GLIO_ONLY_DWARF2: "-dwarf-version=2"
//
// G_ONLY: "-cc1"
-// G_ONLY: "-debug-info-kind=constructor"
+// G_ONLY: "-debug-info-kind=limited"
//
// These tests assert that "-gline-tables-only" "-g" uses the latter,
// but otherwise not caring about the DebugInfoKind.
// G_ONLY_DWARF2: "-cc1"
-// G_ONLY_DWARF2: "-debug-info-kind={{standalone|constructor}}"
+// G_ONLY_DWARF2: "-debug-info-kind={{standalone|limited}}"
// G_ONLY_DWARF2: "-dwarf-version=2"
//
// G_STANDALONE: "-cc1"
// G_STANDALONE: "-debug-info-kind=standalone"
// G_LIMITED: "-cc1"
-// G_LIMITED: "-debug-info-kind=constructor"
+// G_LIMITED: "-debug-info-kind=limited"
// G_DWARF2: "-dwarf-version=2"
// G_DWARF4-DAG: "-dwarf-version=4"
// G_DWARF5-DAG: "-dwarf-version=5"
// NOCI-DAG: "-gno-column-info"
//
// GEXTREFS: "-dwarf-ext-refs" "-fmodule-format=obj"
-// GEXTREFS: "-debug-info-kind={{standalone|constructor}}"
+// GEXTREFS: "-debug-info-kind={{standalone|limited}}"
// RUN: not %clang -cc1 -debug-info-kind=watkind 2>&1 | FileCheck -check-prefix=BADSTRING1 %s
// BADSTRING1: error: invalid value 'watkind' in '-debug-info-kind=watkind'
// RUN: | FileCheck -check-prefix=NO_DEBUG_UNUSED_TYPES %s
// RUN: %clang -### -fno-eliminate-unused-debug-types -g1 -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=NO_DEBUG_UNUSED_TYPES %s
-// NO_DEBUG_UNUSED_TYPES: "-debug-info-kind={{constructor|line-tables-only|standalone}}"
+// NO_DEBUG_UNUSED_TYPES: "-debug-info-kind={{limited|line-tables-only|standalone}}"
// NO_DEBUG_UNUSED_TYPES-NOT: "-debug-info-kind=unused-types"
//
// RUN: %clang -### -c -gdwarf-5 -gdwarf64 -target x86_64 %s 2>&1 | FileCheck -check-prefix=GDWARF64_ON %s
// XA_INCLUDE2: "-Ifoo_dir"
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s
-// DWARF2: "-debug-info-kind=constructor" "-dwarf-version=2"
+// DWARF2: "-debug-info-kind=limited" "-dwarf-version=2"
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s
-// DWARF3: "-debug-info-kind=constructor" "-dwarf-version=3"
+// DWARF3: "-debug-info-kind=limited" "-dwarf-version=3"
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s
-// DWARF4: "-debug-info-kind=constructor" "-dwarf-version=4"
+// DWARF4: "-debug-info-kind=limited" "-dwarf-version=4"
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s
-// DWARF2XASSEMBLER: "-debug-info-kind=constructor" "-dwarf-version=2"
+// DWARF2XASSEMBLER: "-debug-info-kind=limited" "-dwarf-version=2"
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
-// DWARF2WA: "-debug-info-kind=constructor" "-dwarf-version=2"
+// DWARF2WA: "-debug-info-kind=limited" "-dwarf-version=2"
// A dwarf version number that driver can't parse is just stuffed in.
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-huh 2>&1 | FileCheck --check-prefix=BOGODWARF %s
// NOSTDLIB-NOT: "-lc"
// RUN: %clang -### -c -g %s --target=sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %s
-// G_SPARC: "-debug-info-kind=constructor" "-dwarf-version=2"
+// G_SPARC: "-debug-info-kind=limited" "-dwarf-version=2"
// RUN: %clang -### -c %s --target=sparc-myriad-rtems -fuse-init-array 2>&1 \
// RUN: | FileCheck -check-prefix=USE-INIT-ARRAY %s
// HAS_DEBUG-NOT: warning: debug
// HAS_DEBUG: "-triple" "nvptx64-nvidia-cuda"
-// HAS_DEBUG-SAME: "-debug-info-kind={{constructor|line-tables-only}}"
+// HAS_DEBUG-SAME: "-debug-info-kind={{limited|line-tables-only}}"
// HAS_DEBUG-SAME: "-dwarf-version=2"
// HAS_DEBUG-SAME: "-fopenmp-is-device"
// HAS_DEBUG: ptxas
// INLINE: "-fsplit-dwarf-inlining"
// NOINLINE-NOT: "-fsplit-dwarf-inlining"
-// SPLIT: "-debug-info-kind=constructor"
+// SPLIT: "-debug-info-kind=limited"
// SPLIT-SAME: "-ggnu-pubnames"
// SPLIT-SAME: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo"
// RUN: %clang -### -c -target x86_64 -gsplit-dwarf=single -g -gno-split-dwarf %s 2>&1 | FileCheck %s --check-prefix=NOSPLIT
// RUN: %clang -### -c -target x86_64 -gno-split-dwarf -g -gsplit-dwarf %s 2>&1 | FileCheck %s --check-prefixes=NOINLINE,SPLIT
-// NOSPLIT: "-debug-info-kind=constructor"
+// NOSPLIT: "-debug-info-kind=limited"
// NOSPLIT-NOT: "-ggnu-pubnames"
// NOSPLIT-NOT: "-split-dwarf
/// Test -gsplit-dwarf=single.
// RUN: %clang -### -c -target x86_64 -gsplit-dwarf=single -g %s 2>&1 | FileCheck %s --check-prefix=SINGLE
-// SINGLE: "-debug-info-kind=constructor"
+// SINGLE: "-debug-info-kind=limited"
// SINGLE: "-split-dwarf-file" "split-debug.o"
// SINGLE-NOT: "-split-dwarf-output"
// RUN: %clang -### -c -target x86_64 -gsplit-dwarf=split -g -gno-pubnames %s 2>&1 | FileCheck %s --check-prefixes=NOPUBNAMES
// RUN: %clang -### -c -target x86_64 -gsplit-dwarf=split -g -gno-gnu-pubnames %s 2>&1 | FileCheck %s --check-prefixes=NOPUBNAMES
-// NOPUBNAMES: "-debug-info-kind=constructor"
+// NOPUBNAMES: "-debug-info-kind=limited"
// NOPUBNAMES-NOT: "-ggnu-pubnames"
// NOPUBNAMES-SAME: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo"
// REQUIRES: x86_64-linux
-// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=constructor -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=line-directives-only -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=NEG
// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=line-tables-only -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=NEG
// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=limited -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s
// REQUIRES: x86_64-linux
-// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=constructor -DSHARED -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK
-// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=constructor -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=NEG
+// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=limited -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=NEG
// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=line-directives-only -DSHARED -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=NEG
// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=line-tables-only -DSHARED -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=NEG
// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=limited -DSHARED -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK
// REQUIRES: x86_64-linux
-// RUN: %clang_cc1 -debug-info-kind=constructor -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
// CHECK: define internal void @.omp_outlined._debug__(