Skip to content

Commit 02fff2b

Browse files
committed
Change to getIntegerValue
1 parent b1e9fff commit 02fff2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23851,8 +23851,8 @@ CodeGenFunction::EmitIntelSYCLAllocaBuiltin(const CallExpr *E,
2385123851
"Expecting a single aspect");
2385223852
llvm::APSInt AspectInt =
2385323853
(*AspectAttr->aspects_begin())->EvaluateKnownConstInt(getContext());
23854-
llvm::Constant *C =
23855-
Builder.getInt32(static_cast<int32_t>(AspectInt.getZExtValue()));
23854+
llvm::Type *I32Ty = Builder.getInt32Ty();
23855+
llvm::Constant *C = llvm::Constant::getIntegerValue(I32Ty, AspectInt);
2385623856
llvm::Metadata *AspectMD = llvm::ConstantAsMetadata::get(C);
2385723857
F->setMetadata(MDName, llvm::MDNode::get(Builder.getContext(), AspectMD));
2385823858
}

0 commit comments

Comments
 (0)