Skip to content

[Driver] Move CommonArgs to a location visible by the Frontend Drivers #142800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 6, 2025
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ void handleVectorizeLoopsArgs(const llvm::opt::ArgList &Args,
/// Enable -fslp-vectorize based on the optimization level selected.
void handleVectorizeSLPArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs);

std::optional<StringRef> ParseMPreferVectorWidthOption(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a docstring for this function

clang::DiagnosticsEngine &Diags, const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs, bool isCompilerDriver);

} // end namespace tools
} // end namespace driver
} // end namespace clang
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/MultilibBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "clang/Driver/MultilibBuilder.h"
#include "ToolChains/CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Regex.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
#include "ToolChains/Arch/ARM.h"
#include "ToolChains/Arch/RISCV.h"
#include "ToolChains/Clang.h"
#include "ToolChains/CommonArgs.h"
#include "ToolChains/Flang.h"
#include "ToolChains/InterfaceStubs.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Config/config.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Job.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/AIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "AIX.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/SanitizerArgs.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/AMDGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "AMDGPU.h"
#include "CommonArgs.h"
#include "clang/Basic/TargetID.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/AVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "AVR.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Arch/AArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "AArch64.h"
#include "../CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/Option/ArgList.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Arch/LoongArch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "LoongArch.h"
#include "../Clang.h"
#include "ToolChains/CommonArgs.h"
#include "clang/Basic/DiagnosticDriver.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/TargetParser/Host.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Arch/Mips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "Mips.h"
#include "ToolChains/CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/ADT/StringSwitch.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Arch/PPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "PPC.h"
#include "ToolChains/CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/ADT/StringSwitch.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Arch/RISCV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "RISCV.h"
#include "../Clang.h"
#include "ToolChains/CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/Option/ArgList.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/BareMetal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "BareMetal.h"

#include "CommonArgs.h"
#include "Gnu.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/InputInfo.h"

#include "Arch/ARM.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/CSKYToolChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "CSKYToolChain.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
Expand Down
26 changes: 3 additions & 23 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "Arch/RISCV.h"
#include "Arch/Sparc.h"
#include "Arch/SystemZ.h"
#include "CommonArgs.h"
#include "Hexagon.h"
#include "PS4CPU.h"
#include "clang/Basic/CLWarnings.h"
Expand All @@ -26,6 +25,7 @@
#include "clang/Basic/Version.h"
#include "clang/Config/config.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Distro.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
Expand Down Expand Up @@ -264,27 +264,6 @@ static void ParseMRecip(const Driver &D, const ArgList &Args,
OutStrings.push_back(Args.MakeArgString(Out));
}

/// The -mprefer-vector-width option accepts either a positive integer
/// or the string "none".
static void ParseMPreferVectorWidth(const Driver &D, const ArgList &Args,
ArgStringList &CmdArgs) {
Arg *A = Args.getLastArg(options::OPT_mprefer_vector_width_EQ);
if (!A)
return;

StringRef Value = A->getValue();
if (Value == "none") {
CmdArgs.push_back("-mprefer-vector-width=none");
} else {
unsigned Width;
if (Value.getAsInteger(10, Width)) {
D.Diag(diag::err_drv_invalid_value) << A->getOption().getName() << Value;
return;
}
CmdArgs.push_back(Args.MakeArgString("-mprefer-vector-width=" + Value));
}
}

static bool
shouldUseExceptionTablesForObjCExceptions(const ObjCRuntime &runtime,
const llvm::Triple &Triple) {
Expand Down Expand Up @@ -7607,7 +7586,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,

handleVectorizeLoopsArgs(Args, CmdArgs);
handleVectorizeSLPArgs(Args, CmdArgs);
ParseMPreferVectorWidth(D, Args, CmdArgs);
ParseMPreferVectorWidthOption(D.getDiags(), Args, CmdArgs,
/*isCompilerDriver=*/true);

Args.AddLastArg(CmdArgs, options::OPT_fshow_overloads_EQ);
Args.AddLastArg(CmdArgs,
Expand Down
28 changes: 27 additions & 1 deletion clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "Arch/AArch64.h"
#include "Arch/ARM.h"
#include "Arch/CSKY.h"
Expand Down Expand Up @@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args,
options::OPT_fno_loop_interchange, EnableInterchange))
CmdArgs.push_back("-floop-interchange");
}

std::optional<StringRef> tools::ParseMPreferVectorWidthOption(
clang::DiagnosticsEngine &Diags, const llvm::opt::ArgList &Args,
ArgStringList &CmdArgs, bool isCompilerDriver) {
// If this was invoked by the Compiler Driver, we pass through the option
// as-is. Otherwise, if this is the Frontend Driver, we want just the value.
StringRef Out = isCompilerDriver ? "-mprefer-vector-width=" : "";

Arg *A = Args.getLastArg(clang::driver::options::OPT_mprefer_vector_width_EQ);
if (!A)
return std::nullopt;

StringRef Value = A->getValue();
unsigned Width __attribute((uninitialized));

// Only "none" and Integer values are accepted by
// -mprefer-vector-width=<value>.
if (Value != "none" && Value.getAsInteger(10, Width)) {
Diags.Report(clang::diag::err_drv_invalid_value)
<< A->getOption().getName() << Value;
return std::nullopt;
}

CmdArgs.push_back(Args.MakeArgString(Out + Value));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe the function should just return Value, and then the callers may process it as needed (e.g. prepend it with -mprefer-vector-width= and push it into the args list) This behavior will align with the name of the function a little better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this function behaves is consistent with the way options are handled in this part of the code. We could consider renaming the function handleMPreferVectorWidthOptions if the word "Parse" suggests that it will return something.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this aligns with how other functions work. At the same time, it seems awkward to me that we push just the value into the args-list, when the caller is a frontend driver.

Copy link
Contributor Author

@mcinally mcinally Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awkward. I was hoping someone with more C++ expertise would have a trick to streamline it.

I chose this solution so that the Compiler Driver side would be as undisturbed as possible.

I also don't feel strongly that it needs to change for an initial implementation. It's something we could build out in the future as we learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function could take an ArgStringList*, only push Out + Value if it is provided, and always return Value as a StringRef.

That way the compiler driver can pass the list and ignore the result and the frontend can just use the result.

Not sure if it would works with all options, I am not familiar with the drivers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function could take an ArgStringList*, only push Out + Value if it is provided, and always return Value as a StringRef.

That would work. It would disturb the Compiler Driver a bit to avoid warnings. We'd need to explicitly discard the results when unwanted. E.g.:

(void)ParseMPreferVectorWidthOption(...);

I wonder if we could come up with a Frontend Driver mechanism to discard everything up to and including the =. Then we'd just need to wrap the parsing/handling call in that mechanism.

Not sure if it would works with all options, I am not familiar with the drivers.

Same. I suggest that we delay this decision until there's a better view of the entire problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh! Sorry, I somehow missed the real issue here. Sorry, it must have been one of those days.

That would work. It would disturb the Compiler Driver a bit to avoid warnings. We'd need to explicitly discard the results when unwanted. E.g.:

(void)ParseMPreferVectorWidthOption(...);

Just to clarify, by warnings you mean warnings when building clang itself, right?

Same. I suggest that we delay this decision until there's a better view of the entire problem.

Is the real issue here that we need to validate the argument values? It is a fairly common pattern in, e.g. clang/lib/Frontend/CompilerInvocation.cpp to look at the ArgList and parse the arguments there. It may be better to share the argument validation and return, say, an optional value with the correctly parsed value if it exists. How does that sound?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, by warnings you mean warnings when building clang itself, right?

Correct. The unused result would be a warning.

Is the real issue here that we need to validate the argument values? It is a fairly common pattern in, e.g. clang/lib/Frontend/CompilerInvocation.cpp to look at the ArgList and parse the arguments there.

Yes, that's what we're trying to avoid. Both Frontend/CompilerInvocation.cpp and Driver/FC]lang.cpp could do verification, but we don't want to have the same/similar code in both places. This patch would let Frontend/CompilerInvocation.cpp and Driver/[FC]lang.cpp share the same parsing/handling functions.

It may be better to share the argument validation and return, say, an optional value with the correctly parsed value if it exists. How does that sound?

I like that!!

I'll wait to see if there are other ideas before updating the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I take that back. This solution is pretty slick. Sharing an update now...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be better to always return just the value here, instead of option + value. We can still add to CmdArgs if isCompilerDriver=true. That way, we don't have to make the change in the caller-side. The caller can just ignore the return value. In the case where isCompilerDriver=false, we can initialize the options object with the return value as appropriate. Does that sound reasonable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative would be to not add to CmdArgs here, but to do it in the caller instead. I think that is ok too. It would be a bit of a departure from the way the rest of the code works, but it feels like a more "natural" way of handling this. The rest of the code could, gradually, be made more consistent with this approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative would be to not add to CmdArgs here, but to do it in the caller instead.

That's a good point as well. There are plenty of CmdArgs.push_back(...)'s in clang/lib/Driver/ToolChains/Clang.cpp already, so it wouldn't be awkward.

Let me code that up and we can see if we like it...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed a new patch. I like it a lot. See what you think...

We were able to get rid of isCompilerDriver and the clang/lib/Driver/ToolChains/Clang.cpp change doesn't look awkward at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

))) this is what I suggested 2 days ago

Thank you, Cameron!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

))) this is what I suggested 2 days ago

Yes. As I said 1 day ago, I am not sure how I missed the obvious the first time around. :-)

return Value;
}
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/CrossWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "CrossWindows.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "Cuda.h"
#include "CommonArgs.h"
#include "clang/Basic/Cuda.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Distro.h"
#include "clang/Driver/Driver.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Cygwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "Cygwin.h"
#include "CommonArgs.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/Support/Path.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Darwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#include "Darwin.h"
#include "Arch/ARM.h"
#include "CommonArgs.h"
#include "clang/Basic/AlignedAllocation.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/DragonFly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "DragonFly.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Flang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include "Flang.h"
#include "Arch/RISCV.h"
#include "CommonArgs.h"

#include "clang/Basic/CodeGenOptions.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Options.h"
#include "llvm/Frontend/Debug/Options.h"
#include "llvm/Support/Path.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/FreeBSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "Arch/ARM.h"
#include "Arch/Mips.h"
#include "Arch/Sparc.h"
#include "CommonArgs.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/SanitizerArgs.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Fuchsia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "Fuchsia.h"
#include "CommonArgs.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/MultilibBuilder.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Gnu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "Arch/RISCV.h"
#include "Arch/Sparc.h"
#include "Arch/SystemZ.h"
#include "CommonArgs.h"
#include "clang/Config/config.h" // for GCC_INSTALL_PREFIX
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/MultilibBuilder.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/HIPAMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#include "HIPAMD.h"
#include "AMDGPU.h"
#include "CommonArgs.h"
#include "HIPUtility.h"
#include "SPIRV.h"
#include "clang/Basic/Cuda.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/InputInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/HIPSPV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "HIPSPV.h"
#include "CommonArgs.h"
#include "HIPUtility.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/InputInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/HIPUtility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "HIPUtility.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Options.h"
#include "llvm/ADT/StringExtras.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/HLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "HLSL.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Job.h"
#include "llvm/ADT/StringSwitch.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Haiku.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "Haiku.h"
#include "CommonArgs.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/SanitizerArgs.h"
#include "llvm/Support/Path.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Hexagon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "Hexagon.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/InputInfo.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Hurd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "Hurd.h"
#include "CommonArgs.h"
#include "clang/Config/config.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Options.h"
#include "llvm/Support/Path.h"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/InterfaceStubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

#include "InterfaceStubs.h"
#include "CommonArgs.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Compilation.h"
#include "llvm/Support/Path.h"

Expand Down
Loading
Loading