[clang] [clang][Darwin] Minor args cleanup (PR #139142)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 8 13:08:29 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver
Author: Ian Anderson (ian-twilightcoder)
<details>
<summary>Changes</summary>
I just realized that ArgList.hasArg takes multiple arguments. Consolidate the two calls into one.
---
Full diff: https://github.com/llvm/llvm-project/pull/139142.diff
1 Files Affected:
- (modified) clang/lib/Driver/ToolChains/Darwin.cpp (+1-2)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index 76fa2d121db2a..fe3952ee76229 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -2582,8 +2582,7 @@ void DarwinClang::AddClangSystemIncludeArgs(
llvm::opt::ArgStringList &CC1Args) const {
AppleMachO::AddClangSystemIncludeArgs(DriverArgs, CC1Args);
- if (DriverArgs.hasArg(options::OPT_nostdinc) ||
- DriverArgs.hasArg(options::OPT_nostdlibinc))
+ if (DriverArgs.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc))
return;
llvm::SmallString<128> Sysroot = GetEffectiveSysroot(DriverArgs);
``````````
</details>
https://github.com/llvm/llvm-project/pull/139142
More information about the cfe-commits
mailing list