mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 17:07:36 +08:00
Always pass a -dwarf-version argument to integrated as.
This removes the default of 3 hidden in the assembler previously. Fixes breakage caused by r249655, reported by vsukharev. llvm-svn: 250173
This commit is contained in:
@@ -5632,10 +5632,11 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
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),
|
||||
|
||||
15
clang/test/Driver/as-default-dwarf.s
Normal file
15
clang/test/Driver/as-default-dwarf.s
Normal file
@@ -0,0 +1,15 @@
|
||||
@ 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
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
RelaxAll = 0;
|
||||
NoExecStack = 0;
|
||||
FatalWarnings = 0;
|
||||
DwarfVersion = 3;
|
||||
DwarfVersion = 0;
|
||||
}
|
||||
|
||||
static bool CreateFromArgs(AssemblerInvocation &Res,
|
||||
|
||||
Reference in New Issue
Block a user