aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-05-07 09:15:52 -0700
committerGitHub <noreply@github.com>2024-05-07 09:15:52 -0700
commite74a7a9fd79a74073277471243a44527c71eb4a9 (patch)
tree26190bea93a8badbe5376ae006f06e4987b3ebc2 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentf00f2941307e04d3b7320969ee3fec9af31246ba (diff)
downloadllvm-e74a7a9fd79a74073277471243a44527c71eb4a9.zip
llvm-e74a7a9fd79a74073277471243a44527c71eb4a9.tar.gz
llvm-e74a7a9fd79a74073277471243a44527c71eb4a9.tar.bz2
cc1: Report an error for multiple actions unless separated by -main-file-name (#91140)
When multiple actions are specified, the last one is used and others are overridden. This might lead to confusion if the user is used to driver's `-S -emit-llvm` behavior. ``` %clang_cc1 -S -emit-llvm a.c # -S is overridden %clang_cc1 -emit-llvm -S a.c # -emit-llvm is overridden %clang_cc1 -fsyntax-only -S a.c # -fsyntax-only is overridden ``` However, we want to continue supporting overriding the driver action with -Xclang: * `clang -c -Xclang -ast-dump a.c` (`%clang -cc1 -emit-obj ... -main-file-name a.c ... -ast-dump`) * `clang -c -xc++ -Xclang -emit-module stl.modulemap` As an exception, we allow -ast-dump* options to be composed together (e.g. `-ast-dump -ast-dump-lookups` in AST/ast-dump-lookups.cpp).
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions