forked from OSchip/llvm-project
[driver] Improve r141053 by only emitting the warning if the original input
was assembly. Otherwise, something like -save-temps causes the integrated assembler to warn. llvm-svn: 141127
This commit is contained in:
parent
7dc477ef77
commit
6c98dfd0f4
|
@ -122,9 +122,6 @@ def warn_drv_objc_gc_unsupported : Warning<
|
|||
"Objective-C garbage collection is not supported on this platform, ignoring '%0'">;
|
||||
def warn_drv_pch_not_first_include : Warning<
|
||||
"precompiled header '%0' was ignored because '%1' is not first '-include'">;
|
||||
def warn_drv_no_debug_w_integrated_as : Warning<
|
||||
"ignoring unsupported -g option with integrated assembler">,
|
||||
InGroup<DiagGroup<"unsupported-debug-with-integrated-as">>;
|
||||
|
||||
def note_drv_command_failed_diag_msg : Note<
|
||||
"diagnostic msg: %0">;
|
||||
|
|
|
@ -2318,21 +2318,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// Ignore explicit -force_cpusubtype_ALL option.
|
||||
(void) Args.hasArg(options::OPT_force__cpusubtype__ALL);
|
||||
|
||||
// Determine the original source input.
|
||||
const Action *SourceAction = &JA;
|
||||
while (SourceAction->getKind() != Action::InputClass) {
|
||||
assert(!SourceAction->getInputs().empty() && "unexpected root action!");
|
||||
SourceAction = SourceAction->getInputs()[0];
|
||||
}
|
||||
|
||||
// FIXME: Add -g support, once we have it. For now, emit a warning indicating
|
||||
// the integrated assembler doesn't support debug info.
|
||||
if (SourceAction->getType() == types::TY_Asm ||
|
||||
SourceAction->getType() == types::TY_PP_Asm) {
|
||||
if (Args.hasArg(options::OPT_g_Group)) {
|
||||
getToolChain().getDriver().Diag(diag::warn_drv_no_debug_w_integrated_as);
|
||||
}
|
||||
}
|
||||
// FIXME: Add -g support, once we have it.
|
||||
|
||||
// FIXME: Add -static support, once we have it.
|
||||
|
||||
|
|
Loading…
Reference in New Issue