[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 22 11:50:12 PDT 2023
nickdesaulniers added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:976-985
+ bool IsInputTyAsm = false;
+ for (const auto &II : Inputs) {
+ CmdArgs.push_back(II.getFilename());
+ StringRef BaseInput = StringRef(II.getBaseInput());
+ types::ID InputType = types::lookupTypeForExtension(
+ llvm::sys::path::extension(BaseInput).drop_front());
+ if (InputType == types::TY_Asm || InputType == types::TY_PP_Asm)
----------------
Thinking about this more, does the issue still exist if the user passed .c and .s/.S files together?
i.e. `$ clang ... -fno-integrated-as -gdwarf-4 foo.s main.c`?
================
Comment at: clang/test/Driver/as-options.cpp:1
+// Test that -g and -gdwarf-* are not passed through to GAS.
+// RUN: %clang --target=arm-linux-gnueabi -fno-integrated-as -g -c %s -### 2>&1 | \
----------------
please `chmod 644` this file; `755` is what I'd expect for a directory.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145726/new/
https://reviews.llvm.org/D145726
More information about the cfe-commits
mailing list