aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2020-08-25 14:23:14 +0100
committerJeremy Morse <jeremy.morse@sony.com>2020-08-25 14:58:48 +0100
commit121a49d839d79f5a72be3e22a9d156c9e4b219dc (patch)
tree21e9d0589dd240423fc27d08835497eccd2ca946 /clang/lib/Frontend/CompilerInvocation.cpp
parent0d2fe90063e956716c3067322aef898822d0dc0e (diff)
downloadllvm-121a49d839d79f5a72be3e22a9d156c9e4b219dc.zip
llvm-121a49d839d79f5a72be3e22a9d156c9e4b219dc.tar.gz
llvm-121a49d839d79f5a72be3e22a9d156c9e4b219dc.tar.bz2
[LiveDebugValues] Add switches for using instr-ref variable locations
This patch adds the -Xclang option "-fexperimental-debug-variable-locations" and same LLVM CodeGen option, to pick which variable location tracking solution to use. Right now all the switch does is pick which LiveDebugValues implementation to use, the normal VarLoc one or the instruction referencing one in rGae6f78824031. Over time, the aim is to add fragments of support in aid of the value-tracking RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-February/139440.html also controlled by this command line switch. That will slowly move variable locations to be defined by an instruction calculating a value, and a DBG_INSTR_REF instruction referring to that value. Thus, this is going to grow into a "use the new kind of variable locations" switch, rather than just "use the new LiveDebugValues implementation". Differential Revision: https://reviews.llvm.org/D83048
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 175985b..0313ff4 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -835,6 +835,9 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
llvm::is_contained(DebugEntryValueArchs, T.getArch()))
Opts.EmitCallSiteInfo = true;
+ Opts.ValueTrackingVariableLocations =
+ Args.hasArg(OPT_fexperimental_debug_variable_locations);
+
Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone);
Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);
Opts.IndirectTlsSegRefs = Args.hasArg(OPT_mno_tls_direct_seg_refs);