summaryrefslogtreecommitdiffstats
path: root/tools/driver
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-04-19 20:31:19 +0000
committerAdrian Prantl <aprantl@apple.com>2016-04-19 20:31:19 +0000
commit99fb8a4a1fbb18b0031f22e5d8aa320a37c0acbb (patch)
treee8d0941b9c93bcf3b69c971616906f53cece7f88 /tools/driver
parentfa8ab2562a582a60fb7dff9d873b65d84ab864f4 (diff)
cc1as: Don't crash when CIE is requested and no DWARF version is specified.
This patch changes the default DWARF version for cc1as from invalid 0 to 2, which should be the lowest common denominator on all platforms. rdar://problem/24735813 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver')
-rw-r--r--tools/driver/cc1as_main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp
index 388a769358..bcc2cde17a 100644
--- a/tools/driver/cc1as_main.cpp
+++ b/tools/driver/cc1as_main.cpp
@@ -200,7 +200,7 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
// Any DebugInfoKind implies GenDwarfForAssembly.
Opts.GenDwarfForAssembly = Args.hasArg(OPT_debug_info_kind_EQ);
Opts.CompressDebugSections = Args.hasArg(OPT_compress_debug_sections);
- Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
+ Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 2, Diags);
Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
Opts.DwarfDebugProducer = Args.getLastArgValue(OPT_dwarf_debug_producer);
Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir);