Skip to content

Commit 01eda28

Browse files
committed
Fix windows build after 7c59e80 (#12594)
1 parent 7ba52a7 commit 01eda28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libclc/utils/libclc-remangler/LibclcRemangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static cl::opt<bool> TestRun("t", cl::desc("Enable test run"), cl::init(false),
100100
static cl::extrahelp CommonHelp(CommonOptionsParser::HelpMessage);
101101

102102
namespace {
103-
inline StringRef asRef(std::string_view S) { return {S.begin(), S.size()}; }
103+
inline StringRef asRef(std::string_view S) { return {&*S.begin(), S.size()}; }
104104
class BumpPointerAllocator {
105105
public:
106106
BumpPointerAllocator()

llvm/lib/SYCLLowerIR/ESIMD/LowerESIMD.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ static APInt parseTemplateArg(id::FunctionEncoding *FE, unsigned int N,
804804
if (Conv == ESIMDIntrinDesc::GenXArgConversion::NONE && TyStr.size() != 0)
805805
// Overwrite Ty with IntegerLiteral's size
806806
Ty =
807-
parsePrimitiveTypeString(StringRef(TyStr.begin(), TyStr.size()), Ctx);
807+
parsePrimitiveTypeString(StringRef(&*TyStr.begin(), TyStr.size()), Ctx);
808808
Val = ValL->getValue();
809809
break;
810810
}
@@ -821,7 +821,7 @@ static APInt parseTemplateArg(id::FunctionEncoding *FE, unsigned int N,
821821
default:
822822
llvm_unreachable_internal("bad esimd intrinsic template parameter");
823823
}
824-
return APInt(Ty->getPrimitiveSizeInBits(), StringRef(Val.begin(), Val.size()),
824+
return APInt(Ty->getPrimitiveSizeInBits(), StringRef(&*Val.begin(), Val.size()),
825825
10);
826826
}
827827

@@ -1496,7 +1496,7 @@ static void translateESIMDIntrinsicCall(CallInst &CI) {
14961496
auto PrefLen = isDevicelibFunction(F->getName())
14971497
? 0
14981498
: StringRef(ESIMD_INTRIN_PREF1).size();
1499-
StringRef BaseName(BaseNameV.begin() + PrefLen, BaseNameV.size() - PrefLen);
1499+
StringRef BaseName(&*BaseNameV.begin() + PrefLen, BaseNameV.size() - PrefLen);
15001500
const auto &Desc = getIntrinDesc(BaseName);
15011501
if (!Desc.isValid()) // TODO remove this once all intrinsics are supported
15021502
return;

0 commit comments

Comments
 (0)