[clang] 0d51247 - [clang][Darwin] Minor args cleanup (#139142)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 9 11:37:51 PDT 2025
Author: Ian Anderson
Date: 2025-05-09T11:37:47-07:00
New Revision: 0d5124775cace200f6f99905989ebeb65853b16e
URL: https://github.com/llvm/llvm-project/commit/0d5124775cace200f6f99905989ebeb65853b16e
DIFF: https://github.com/llvm/llvm-project/commit/0d5124775cace200f6f99905989ebeb65853b16e.diff
LOG: [clang][Darwin] Minor args cleanup (#139142)
I just realized that ArgList.hasArg takes multiple arguments.
Consolidate the two calls into one.
Added:
Modified:
clang/lib/Driver/ToolChains/Darwin.cpp
Removed:
################################################################################
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);
More information about the cfe-commits
mailing list