Skip to content

Commit

Permalink
Revert "DebugInfo: Fully integrate ctor type homing into 'limited' de…
Browse files Browse the repository at this point in the history
…bug info"

Reverting to simplify some Google-internal rollout issues. Will recommit
in a week or two.

This reverts commit 517bbc6.
  • Loading branch information
dwblaikie committed Jun 24, 2022
1 parent e0d0695 commit 4821508
Show file tree
Hide file tree
Showing 28 changed files with 132 additions and 61 deletions.
13 changes: 13 additions & 0 deletions clang/docs/UsersManual.rst
Expand Up @@ -2672,6 +2672,19 @@ below. If multiple flags are present, the last one is used.
**-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.
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/CodeGenOptions.h
Expand Up @@ -468,7 +468,7 @@ class CodeGenOptions : public CodeGenOptionsBase {

/// Check if type and variable info should be emitted.
bool hasReducedDebugInfo() const {
return getDebugInfo() >= codegenoptions::LimitedDebugInfo;
return getDebugInfo() >= codegenoptions::DebugInfoConstructor;
}

/// Check if maybe unused type info should be emitted.
Expand Down
6 changes: 6 additions & 0 deletions clang/include/clang/Basic/DebugInfoOptions.h
Expand Up @@ -34,6 +34,12 @@ enum DebugInfoKind {
/// (-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
Expand Down
5 changes: 5 additions & 0 deletions clang/include/clang/Driver/Options.td
Expand Up @@ -5246,6 +5246,11 @@ def mrelocation_model : Separate<["-"], "mrelocation-model">,
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 {
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/CodeGen/CGDebugInfo.cpp
Expand Up @@ -27,7 +27,6 @@
#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"
Expand Down Expand Up @@ -587,6 +586,7 @@ void CGDebugInfo::CreateCompileUnit() {
case codegenoptions::DebugDirectivesOnly:
EmissionKind = llvm::DICompileUnit::DebugDirectivesOnly;
break;
case codegenoptions::DebugInfoConstructor:
case codegenoptions::LimitedDebugInfo:
case codegenoptions::FullDebugInfo:
case codegenoptions::UnusedTypeInfo:
Expand Down Expand Up @@ -1861,7 +1861,7 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction(

// In this debug mode, emit type info for a class when its constructor type
// info is emitted.
if (DebugKind == codegenoptions::LimitedDebugInfo)
if (DebugKind == codegenoptions::DebugInfoConstructor)
if (const CXXConstructorDecl *CD = dyn_cast<CXXConstructorDecl>(Method))
completeUnusedClass(*CD->getParent());

Expand Down Expand Up @@ -2528,7 +2528,7 @@ static bool shouldOmitDefinition(codegenoptions::DebugInfoKind DebugKind,

// In constructor homing mode, only emit complete debug info for a class
// when its constructor is emitted.
if ((DebugKind == codegenoptions::LimitedDebugInfo) &&
if ((DebugKind == codegenoptions::DebugInfoConstructor) &&
canUseCtorHoming(CXXDecl))
return true;

Expand Down Expand Up @@ -3349,7 +3349,7 @@ void CGDebugInfo::completeTemplateDefinition(
}

void CGDebugInfo::completeUnusedClass(const CXXRecordDecl &D) {
if (DebugKind <= codegenoptions::DebugLineTablesOnly || D.isDynamicClass())
if (DebugKind <= codegenoptions::DebugLineTablesOnly)
return;

completeClassData(&D);
Expand Down
23 changes: 13 additions & 10 deletions clang/lib/Driver/ToolChains/Clang.cpp
Expand Up @@ -26,7 +26,6 @@
#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"
Expand Down Expand Up @@ -526,7 +525,7 @@ static codegenoptions::DebugInfoKind DebugLevelToInfoKind(const Arg &A) {
return codegenoptions::DebugLineTablesOnly;
if (A.getOption().matches(options::OPT_gline_directives_only))
return codegenoptions::DebugDirectivesOnly;
return codegenoptions::LimitedDebugInfo;
return codegenoptions::DebugInfoConstructor;
}

static bool mustUseNonLeafFramePointerForTarget(const llvm::Triple &Triple) {
Expand Down Expand Up @@ -1087,6 +1086,9 @@ static void RenderDebugEnablingArgs(const ArgList &Args, ArgStringList &CmdArgs,
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;
Expand Down Expand Up @@ -2668,7 +2670,7 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
CmdArgs.push_back(Value.data());
} else {
RenderDebugEnablingArgs(Args, CmdArgs,
codegenoptions::LimitedDebugInfo,
codegenoptions::DebugInfoConstructor,
DwarfVersion, llvm::DebuggerKind::Default);
}
} else if (Value.startswith("-mcpu") || Value.startswith("-mfpu") ||
Expand Down Expand Up @@ -4094,7 +4096,7 @@ static void renderDebugOptions(const ToolChain &TC, const Driver &D,
}
}
if (const Arg *A = Args.getLastArg(options::OPT_g_Group)) {
DebugInfoKind = codegenoptions::LimitedDebugInfo;
DebugInfoKind = codegenoptions::DebugInfoConstructor;

// If the last option explicitly specified a debug-info level, use it.
if (checkDebugInfoOption(A, Args, D, TC) &&
Expand Down Expand Up @@ -4216,7 +4218,7 @@ static void renderDebugOptions(const ToolChain &TC, const Driver &D,
if (checkDebugInfoOption(A, Args, D, TC)) {
if (DebugInfoKind != codegenoptions::DebugLineTablesOnly &&
DebugInfoKind != codegenoptions::DebugDirectivesOnly) {
DebugInfoKind = codegenoptions::LimitedDebugInfo;
DebugInfoKind = codegenoptions::DebugInfoConstructor;
CmdArgs.push_back("-dwarf-ext-refs");
CmdArgs.push_back("-fmodule-format=obj");
}
Expand All @@ -4237,7 +4239,8 @@ static void renderDebugOptions(const ToolChain &TC, const Driver &D,
if (const Arg *A = Args.getLastArg(options::OPT_fstandalone_debug))
(void)checkDebugInfoOption(A, Args, D, TC);

if (DebugInfoKind == codegenoptions::LimitedDebugInfo) {
if (DebugInfoKind == codegenoptions::LimitedDebugInfo ||
DebugInfoKind == codegenoptions::DebugInfoConstructor) {
if (Args.hasFlag(options::OPT_fno_eliminate_unused_debug_types,
options::OPT_feliminate_unused_debug_types, false))
DebugInfoKind = codegenoptions::UnusedTypeInfo;
Expand Down Expand Up @@ -5435,7 +5438,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// 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::LimitedDebugInfo)
if (DebugInfoKind >= codegenoptions::DebugInfoConstructor)
CmdArgs.push_back("-fjmc");
else
D.Diag(clang::diag::warn_drv_jmc_requires_debuginfo) << "-fjmc"
Expand Down Expand Up @@ -7562,7 +7565,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
options::OPT_gline_tables_only)) {
*EmitCodeView = true;
if (DebugInfoArg->getOption().matches(options::OPT__SLASH_Z7))
*DebugInfoKind = codegenoptions::LimitedDebugInfo;
*DebugInfoKind = codegenoptions::DebugInfoConstructor;
else
*DebugInfoKind = codegenoptions::DebugLineTablesOnly;
} else {
Expand All @@ -7574,7 +7577,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
// 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::LimitedDebugInfo)
if (*EmitCodeView && *DebugInfoKind >= codegenoptions::DebugInfoConstructor)
CmdArgs.push_back("-fjmc");
else
D.Diag(clang::diag::warn_drv_jmc_requires_debuginfo) << "/JMC"
Expand Down Expand Up @@ -7899,7 +7902,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
// 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::LimitedDebugInfo
DebugInfoKind = (WantDebug ? codegenoptions::DebugInfoConstructor
: codegenoptions::NoDebugInfo);

addDebugPrefixMapArg(getToolChain().getDriver(), getToolChain(), Args,
Expand Down
16 changes: 16 additions & 0 deletions clang/lib/Frontend/CompilerInvocation.cpp
Expand Up @@ -1360,6 +1360,9 @@ void CompilerInvocation::GenerateCodeGenArgs(
case codegenoptions::DebugDirectivesOnly:
DebugInfoVal = "line-directives-only";
break;
case codegenoptions::DebugInfoConstructor:
DebugInfoVal = "constructor";
break;
case codegenoptions::LimitedDebugInfo:
DebugInfoVal = "limited";
break;
Expand Down Expand Up @@ -1634,6 +1637,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
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)
Expand All @@ -1645,6 +1649,18 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
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(
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/attr-cpuspecific-renaming.cpp
@@ -1,5 +1,5 @@
// 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
// 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

// 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
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/pr52782-stdcall-func-decl.cpp
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple i686-w64-windows-gnu -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s
// RUN: %clang_cc1 -triple i686-w64-windows-gnu -o - -emit-llvm -debug-info-kind=constructor %s | FileCheck %s

enum nsresult {};

Expand Down
23 changes: 12 additions & 11 deletions clang/test/CodeGenCXX/debug-info-class.cpp
Expand Up @@ -32,21 +32,22 @@ struct D {
};

struct E {
E();
virtual ~E();
virtual void func() {
}
};

struct F {
struct F_inner {
struct inner {
};
static const int i = 2;
virtual ~F();
};

struct G {
virtual void func();
struct G_inner {
struct inner {
int j;
};
};
Expand Down Expand Up @@ -82,7 +83,7 @@ void f1() {
x.func();
E y;
int i = F::i;
F::F_inner z;
F::inner z;
K k;
k.func();
L l;
Expand All @@ -91,7 +92,7 @@ void f1() {

int main(int argc, char **argv) {
B b;
G::G_inner c_i;
G::inner c_i;
if (argc) {
A a;
}
Expand All @@ -115,13 +116,11 @@ int main(int argc, char **argv) {
// 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"
Expand Down Expand Up @@ -174,10 +173,10 @@ int main(int argc, char **argv) {
// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
// CHECK-SAME: declaration: [[L_FUNC_DECL]]

// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G_inner",
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner",{{.*}} line: 50
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]]
// CHECK-SAME: identifier: "_ZTSN1G7G_innerE"
// CHECK-SAME: identifier: "_ZTSN1G5innerE"

// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
// CHECK-SAME: DIFlagFwdDecl
Expand All @@ -187,6 +186,8 @@ int main(int argc, char **argv) {
// 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: 99,
// CHECK: ![[RETLOC]] = !DILocation(line: 98,
// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 100,
// CHECK: ![[RETLOC]] = !DILocation(line: 99,
23 changes: 23 additions & 0 deletions clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp
@@ -0,0 +1,23 @@
// 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;
2 changes: 1 addition & 1 deletion clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -debug-info-kind=constructor -emit-llvm %s -o - | FileCheck %s

// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue
struct A {
Expand Down
@@ -1,5 +1,8 @@
// 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
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenCXX/debug-lambda-this.cpp
Expand Up @@ -12,7 +12,7 @@ int D::d(int x) {
}();
}

// CHECK: ![[D:[0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "D",
// CHECK: ![[D:[0-9]+]] = distinct !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
Expand Down
6 changes: 2 additions & 4 deletions clang/test/CodeGenCXX/ibm128-declarations.cpp
Expand Up @@ -174,7 +174,5 @@ int main(void) {
// CHECK: ret void
// CHECK: }

// 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)
// 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)
5 changes: 3 additions & 2 deletions clang/test/CodeGenCXX/standalone-debug-attribute.cpp
@@ -1,5 +1,6 @@
// 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
// 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.

#if SETATTR
#define STANDALONEDEBUGATTR __attribute__((standalone_debug))
Expand Down

0 comments on commit 4821508

Please sign in to comment.