[flang-commits] [flang] [flang][driver] Improve diagnostic for assembly inputs (PR #174316)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Mon Jan 12 07:30:15 PST 2026
================
@@ -147,6 +147,31 @@ int main(int argc, const char **argv) {
llvm::SmallVector<std::pair<int, const clang::driver::Command *>, 4>
failingCommands;
+ // Reject assembly files as flang does not support assembling
+ if (c) {
+ for (const llvm::opt::Arg *arg : c->getInputArgs()) {
+ if (arg->getOption().getKind() != llvm::opt::Option::InputClass)
+ continue;
+
+ llvm::StringRef filename(arg->getValue());
+
+ // Determine file type from extension
----------------
tarunprabhu wrote:
The name of the function being called is "lookupTypeForExtension". The comment here simply repeats what is very obvious from the code. Getting these right is tricky.
```suggestion
```
https://github.com/llvm/llvm-project/pull/174316
More information about the flang-commits
mailing list