[clang] 006fb62 - Fix build failure of HIPUtility.cpp on Windows
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 13 08:53:55 PST 2021
Author: Yaxun (Sam) Liu
Date: 2021-12-13T11:53:06-05:00
New Revision: 006fb62434f58f69eb7d3d48c81975df2c002778
URL: https://github.com/llvm/llvm-project/commit/006fb62434f58f69eb7d3d48c81975df2c002778
DIFF: https://github.com/llvm/llvm-project/commit/006fb62434f58f69eb7d3d48c81975df2c002778.diff
LOG: Fix build failure of HIPUtility.cpp on Windows
Added:
Modified:
clang/lib/Driver/ToolChains/HIPUtility.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index 03e17de9fbae..1b04a20bacbf 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -9,6 +9,7 @@
#include "HIPUtility.h"
#include "CommonArgs.h"
#include "clang/Driver/Compilation.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Support/Path.h"
@@ -38,7 +39,7 @@ static std::string normalizeForBundler(const llvm::Triple &T,
// Construct a clang-offload-bundler command to bundle code objects for
//
diff erent devices into a HIP fat binary.
void HIP::constructHIPFatbinCommand(Compilation &C, const JobAction &JA,
- StringRef OutputFileName,
+ llvm::StringRef OutputFileName,
const InputInfoList &Inputs,
const llvm::opt::ArgList &Args,
const Tool &T) {
@@ -64,7 +65,7 @@ void HIP::constructHIPFatbinCommand(Compilation &C, const JobAction &JA,
OffloadKind = OffloadKind + "v4";
for (const auto &II : Inputs) {
const auto *A = II.getAction();
- auto ArchStr = StringRef(A->getOffloadingArch());
+ auto ArchStr = llvm::StringRef(A->getOffloadingArch());
BundlerTargetArg +=
"," + OffloadKind + "-" + normalizeForBundler(TT, !ArchStr.empty());
if (!ArchStr.empty())
More information about the cfe-commits
mailing list