This removes the default of 3 hidden in the assembler previously.
Fixes breakage caused by r249655, reported by vsukharev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250173
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Arg *A = Args.getLastArg(options::OPT_g_Group)) {
WantDebug = !A->getOption().matches(options::OPT_g0);
if (WantDebug) {
- if ((DwarfVersion = DwarfVersionNum(A->getSpelling())) == 0)
- DwarfVersion = getToolChain().GetDefaultDwarfVersion();
+ DwarfVersion = DwarfVersionNum(A->getSpelling());
}
}
+ if (DwarfVersion == 0)
+ DwarfVersion = getToolChain().GetDefaultDwarfVersion();
RenderDebugEnablingArgs(Args, CmdArgs,
(WantDebug ? CodeGenOptions::LimitedDebugInfo
: CodeGenOptions::NoDebugInfo),
--- /dev/null
+@ REQUIRES: arm-registered-target
+@ RUN: %clang --target=armv8a--linux-gnueabi -c %s -o %t
+@ RUN: llvm-objdump -t %t | FileCheck %s
+ .text
+ .type foo,%function
+foo:
+ .fnstart
+ .cfi_startproc
+
+.Ltmp2:
+ .size foo, .Ltmp2-foo
+ .cfi_endproc
+ .fnend
+ .cfi_sections .debug_frame
+@ CHECK: foo
RelaxAll = 0;
NoExecStack = 0;
FatalWarnings = 0;
- DwarfVersion = 3;
+ DwarfVersion = 0;
}
static bool CreateFromArgs(AssemblerInvocation &Res,