[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 09:55:08 PST 2024
================
@@ -1243,13 +1268,14 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
// Try parsing configuration file.
if (!ContainsError)
ContainsError = loadConfigFiles();
- bool HasConfigFile = !ContainsError && (CfgOptions.get() != nullptr);
+ bool HasConfigFileHead = !ContainsError && CfgOptionsHead;
+ bool HasConfigFileTail = !ContainsError && CfgOptionsTail;
// All arguments, from both config file and command line.
- InputArgList Args = std::move(HasConfigFile ? std::move(*CfgOptions)
- : std::move(*CLOptions));
+ InputArgList Args = std::move(HasConfigFileHead ? std::move(*CfgOptionsHead)
----------------
MaskRay wrote:
the outer `std::move` is unneeded
https://github.com/llvm/llvm-project/pull/117573
More information about the cfe-commits
mailing list