forked from OSchip/llvm-project
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:
parent
e717a7195b
commit
722bcb08f1
clang
|
@ -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),
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue