aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDjordje Todorovic <djordje.todorovic@syrmia.com>2020-03-09 11:02:35 +0100
committerDjordje Todorovic <djordje.todorovic@syrmia.com>2020-03-09 12:12:44 +0100
commitc15c68abdc6f1afece637bdedba808676191a8e6 (patch)
treeac1e7e4608a0a0dd0ec838f88607525c02194f76 /clang/lib/Frontend/CompilerInvocation.cpp
parent59a960b83c2d1559f31e1dd75728dd24fae2f68c (diff)
downloadllvm-c15c68abdc6f1afece637bdedba808676191a8e6.zip
llvm-c15c68abdc6f1afece637bdedba808676191a8e6.tar.gz
llvm-c15c68abdc6f1afece637bdedba808676191a8e6.tar.bz2
[CallSiteInfo] Enable the call site info only for -g + optimizations
Emit call site info only in the case of '-g' + 'O>0' level. Differential Revision: https://reviews.llvm.org/D75175
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 9f3522a..cd8776e 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -788,8 +788,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
llvm::Triple T(TargetOpts.Triple);
if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&
- llvm::is_contained(DebugEntryValueArchs, T.getArch()))
+ llvm::is_contained(DebugEntryValueArchs, T.getArch())) {
Opts.EnableDebugEntryValues = Args.hasArg(OPT_femit_debug_entry_values);
+ Opts.EmitCallSiteInfo = true;
+ }
Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone);
Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);