aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2022-06-22 23:26:23 +0000
committerDavid Blaikie <dblaikie@gmail.com>2022-06-23 20:15:00 +0000
commit517bbc64dbe493644eff8d55fd9566435e930520 (patch)
tree712e95928133fde2dad6987e371f02fc86a7ba95 /clang/lib/Frontend/CompilerInvocation.cpp
parent77f72ac15bcac8923c6bd104f303feaa1e964692 (diff)
downloadllvm-517bbc64dbe493644eff8d55fd9566435e930520.zip
llvm-517bbc64dbe493644eff8d55fd9566435e930520.tar.gz
llvm-517bbc64dbe493644eff8d55fd9566435e930520.tar.bz2
DebugInfo: Fully integrate ctor type homing into 'limited' debug info
Simplify debug info back to just "limited" or "full" by rolling the ctor type homing fully into the "limited" debug info. Also fix a bug I found along the way that was causing ctor type homing to kick in even when something could be vtable homed (where vtable homing is stronger/more effective than ctor homing) - fixing at the same time as it keeps the tests (that were testing only "limited non ctor" homing and now test ctor homing) passing.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index c0eed3a..0cf5978 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1360,9 +1360,6 @@ void CompilerInvocation::GenerateCodeGenArgs(
case codegenoptions::DebugDirectivesOnly:
DebugInfoVal = "line-directives-only";
break;
- case codegenoptions::DebugInfoConstructor:
- DebugInfoVal = "constructor";
- break;
case codegenoptions::LimitedDebugInfo:
DebugInfoVal = "limited";
break;
@@ -1637,7 +1634,6 @@ 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)
@@ -1649,18 +1645,6 @@ 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(