summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp5
-rw-r--r--llvm/lib/IR/IRBuilder.cpp4
-rw-r--r--llvm/lib/IR/Verifier.cpp2
3 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 8910564493e..43abdd2d1e8 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -233,9 +233,8 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn) {
// Upgrade intrinsic attributes. This does not change the function.
if (NewFn)
F = NewFn;
- if (unsigned id = F->getIntrinsicID())
- F->setAttributes(Intrinsic::getAttributes(F->getContext(),
- (Intrinsic::ID)id));
+ if (Intrinsic::ID id = F->getIntrinsicID())
+ F->setAttributes(Intrinsic::getAttributes(F->getContext(), id));
return Upgraded;
}
diff --git a/llvm/lib/IR/IRBuilder.cpp b/llvm/lib/IR/IRBuilder.cpp
index a0b61494e26..335cf363c36 100644
--- a/llvm/lib/IR/IRBuilder.cpp
+++ b/llvm/lib/IR/IRBuilder.cpp
@@ -235,13 +235,13 @@ CallInst *IRBuilderBase::CreateMaskedStore(Value *Val, Value *Ptr,
/// Create a call to a Masked intrinsic, with given intrinsic Id,
/// an array of operands - Ops, and one overloaded type - DataTy
-CallInst *IRBuilderBase::CreateMaskedIntrinsic(unsigned Id,
+CallInst *IRBuilderBase::CreateMaskedIntrinsic(Intrinsic::ID Id,
ArrayRef<Value *> Ops,
Type *DataTy,
const Twine &Name) {
Module *M = BB->getParent()->getParent();
Type *OverloadedTypes[] = { DataTy };
- Value *TheFn = Intrinsic::getDeclaration(M, (Intrinsic::ID)Id, OverloadedTypes);
+ Value *TheFn = Intrinsic::getDeclaration(M, Id, OverloadedTypes);
return createCallHelper(TheFn, Ops, this, Name);
}
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 5dae4e08ced..40c95004449 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2390,7 +2390,7 @@ void Verifier::visitCallInst(CallInst &CI) {
verifyMustTailCall(CI);
if (Function *F = CI.getCalledFunction())
- if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID())
+ if (Intrinsic::ID ID = F->getIntrinsicID())
visitIntrinsicFunctionCall(ID, CI);
}
OpenPOWER on IntegriCloud