Skip to content

Commit 064052a

Browse files
svenvhjsji
authored andcommitted
Replace deprecated CreateGlobalStringPtr (#2726)
Update after llvm commit 04d8e36 ("[IRBuilder] Deprecate CreateGlobalStringPtr() (NFC)", 2024-09-23). Original commit: KhronosGroup/SPIRV-LLVM-Translator@107dae089270702
1 parent aa902d1 commit 064052a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm-spirv/lib/SPIRV/SPIRVReader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,7 +2604,7 @@ Value *SPIRVToLLVM::transValueWithoutDecoration(SPIRVValue *BV, Function *F,
26042604
Value *UndefInt8Ptr = UndefValue::get(Int8PtrTyPrivate);
26052605
Value *UndefInt32 = UndefValue::get(Int32Ty);
26062606

2607-
Constant *GS = Builder.CreateGlobalStringPtr(kOCLBuiltinName::FPGARegIntel);
2607+
Constant *GS = Builder.CreateGlobalString(kOCLBuiltinName::FPGARegIntel);
26082608

26092609
Type *Ty = transType(BC->getType());
26102610
Value *Val = transValue(BC->getOperand(0), F, BB);
@@ -3731,7 +3731,7 @@ void SPIRVToLLVM::transIntelFPGADecorations(SPIRVValue *BV, Value *V) {
37313731
generateIntelFPGAAnnotationForStructMember(ST, I, AnnotStrVec);
37323732
CallInst *AnnotationCall = nullptr;
37333733
for (const auto &AnnotStr : AnnotStrVec) {
3734-
auto *GS = Builder.CreateGlobalStringPtr(AnnotStr);
3734+
auto *GS = Builder.CreateGlobalString(AnnotStr);
37353735

37363736
Instruction *PtrAnnFirstArg = nullptr;
37373737

@@ -3782,7 +3782,7 @@ void SPIRVToLLVM::transIntelFPGADecorations(SPIRVValue *BV, Value *V) {
37823782
if (AnnotItr != AnnotationsMap.end()) {
37833783
GS = AnnotItr->second;
37843784
} else {
3785-
GS = Builder.CreateGlobalStringPtr(AnnotStr);
3785+
GS = Builder.CreateGlobalString(AnnotStr);
37863786
AnnotationsMap.emplace(std::move(StringAnnotStr), GS);
37873787
}
37883788

0 commit comments

Comments
 (0)