[PATCH] D120132: [HIP] Fix HIP include path
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 24 11:34:21 PST 2022
tra added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:486
-void RocmInstallationDetector::AddHIPIncludeArgs(const ArgList &DriverArgs,
- ArgStringList &CC1Args) const {
+std::string RocmInstallationDetector::AddHIPWrapperArgsAndGetIncludePath(
+ const ArgList &DriverArgs, ArgStringList &CC1Args) const {
----------------
I don't think you need to both add args and retrieve HIP SDK path.
================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:520-521
- CC1Args.push_back("-internal-isystem");
- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath()));
if (UsesRuntimeWrapper)
----------------
This is the only change needed to this function.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1470
+ CmdArgs.push_back("-internal-isystem");
+ CmdArgs.push_back(Args.MakeArgString(HIPIncludePath));
+ }
----------------
Path to HIP includes should be added in `AddClangSystemIncludeArgs` which is called from the loop just above.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120132/new/
https://reviews.llvm.org/D120132
More information about the cfe-commits
mailing list