Skip to content

Commit 555fe5a

Browse files
bwlodarczjsji
authored andcommitted
Change ConstantInt.getType to ConstantInt.getIntegerType (intel#2274)
Due to change in LLVM IR in commit dea16eb.
1 parent 0c28e6c commit 555fe5a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm-spirv/lib/SPIRV/SPIRVUtil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,11 +1163,11 @@ std::tuple<unsigned, unsigned, std::string> getSPIRVSource(Module *M) {
11631163

11641164
ConstantInt *mapUInt(Module *M, ConstantInt *I,
11651165
std::function<unsigned(unsigned)> F) {
1166-
return ConstantInt::get(I->getType(), F(I->getZExtValue()), false);
1166+
return ConstantInt::get(I->getIntegerType(), F(I->getZExtValue()), false);
11671167
}
11681168

11691169
ConstantInt *mapSInt(Module *M, ConstantInt *I, std::function<int(int)> F) {
1170-
return ConstantInt::get(I->getType(), F(I->getSExtValue()), true);
1170+
return ConstantInt::get(I->getIntegerType(), F(I->getSExtValue()), true);
11711171
}
11721172

11731173
bool isDecoratedSPIRVFunc(const Function *F, StringRef &UndecoratedName) {

llvm-spirv/lib/SPIRV/SPIRVWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ SPIRVValue *LLVMToSPIRVBase::transConstant(Value *V) {
12151215
}
12161216

12171217
if (auto *ConstI = dyn_cast<ConstantInt>(V)) {
1218-
unsigned BitWidth = ConstI->getType()->getBitWidth();
1218+
unsigned BitWidth = ConstI->getIntegerType()->getBitWidth();
12191219
if (BitWidth > 64) {
12201220
BM->getErrorLog().checkError(
12211221
BM->isAllowedToUseExtension(

0 commit comments

Comments
 (0)