aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 17c43ec..86504ed 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -775,6 +775,12 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
else
Opts.setDebugInfo(static_cast<codegenoptions::DebugInfoKind>(Val));
}
+ // If -fuse-ctor-homing is set and limited debug info is already on, then use
+ // constructor homing.
+ if (Arg *A = Args.getLastArg(OPT_fuse_ctor_homing))
+ if (Opts.getDebugInfo() == codegenoptions::LimitedDebugInfo)
+ Opts.setDebugInfo(codegenoptions::DebugInfoConstructor);
+
if (Arg *A = Args.getLastArg(OPT_debugger_tuning_EQ)) {
unsigned Val = llvm::StringSwitch<unsigned>(A->getValue())
.Case("gdb", unsigned(llvm::DebuggerKind::GDB))