[PATCH] D15650: CC1 part of debugger tuning; pass through setting from driver to LLVM.
Paul Robinson via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 18 15:44:36 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL256063: CC1 part of debugger tuning; pass through setting from driver to LLVM. (authored by probinson).
Changed prior to commit:
http://reviews.llvm.org/D15650?vs=43257&id=43280#toc
Repository:
rL LLVM
http://reviews.llvm.org/D15650
Files:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Frontend/CodeGenOptions.def
cfe/trunk/include/clang/Frontend/CodeGenOptions.h
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Index: cfe/trunk/include/clang/Driver/CC1Options.td
===================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td
+++ cfe/trunk/include/clang/Driver/CC1Options.td
@@ -134,6 +134,7 @@
def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
def dwarf_version_EQ : Joined<["-"], "dwarf-version=">;
+def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">;
def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
HelpText<"The compilation directory to embed in the debug info.">;
def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
Index: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
===================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h
@@ -16,6 +16,7 @@
#include "clang/Basic/Sanitizers.h"
#include "llvm/Support/Regex.h"
+#include "llvm/Target/TargetOptions.h"
#include <map>
#include <memory>
#include <string>
Index: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
===================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.def
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def
@@ -183,6 +183,10 @@
/// The kind of generated debug info.
ENUM_CODEGENOPT(DebugInfo, DebugInfoKind, 3, NoDebugInfo)
+/// Tune the debug info for this debugger.
+ENUM_CODEGENOPT(DebuggerTuning, llvm::DebuggerKind, 2,
+ llvm::DebuggerKind::Default)
+
/// Dwarf version. Version zero indicates to LLVM that no DWARF should be
/// emitted.
VALUE_CODEGENOPT(DwarfVersion, 3, 0)
Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -405,6 +405,13 @@
.Case("limited", CodeGenOptions::LimitedDebugInfo)
.Case("standalone", CodeGenOptions::FullDebugInfo));
}
+ if (Arg *A = Args.getLastArg(OPT_debugger_tuning_EQ)) {
+ Opts.setDebuggerTuning(
+ llvm::StringSwitch<llvm::DebuggerKind>(A->getValue())
+ .Case("gdb", llvm::DebuggerKind::GDB)
+ .Case("lldb", llvm::DebuggerKind::LLDB)
+ .Case("sce", llvm::DebuggerKind::SCE));
+ }
Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info);
Opts.EmitCodeView = Args.hasArg(OPT_gcodeview);
Index: cfe/trunk/lib/CodeGen/BackendUtil.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp
@@ -553,6 +553,7 @@
Options.DataSections = CodeGenOpts.DataSections;
Options.UniqueSectionNames = CodeGenOpts.UniqueSectionNames;
Options.EmulatedTLS = CodeGenOpts.EmulatedTLS;
+ Options.DebuggerTuning = CodeGenOpts.getDebuggerTuning();
Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll;
Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15650.43280.patch
Type: text/x-patch
Size: 3131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151218/0b1dfc22/attachment.bin>
More information about the cfe-commits
mailing list