Convert CallInst and InvokeInst APIs to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 307e71c..010b9e1 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -2697,14 +2697,12 @@
void FragileHazards::emitWriteHazard() {
if (Locals.empty()) return;
- CGF.Builder.CreateCall(WriteHazard, Locals.begin(), Locals.end())
- ->setDoesNotThrow();
+ CGF.Builder.CreateCall(WriteHazard, Locals)->setDoesNotThrow();
}
void FragileHazards::emitReadHazard(CGBuilderTy &Builder) {
assert(!Locals.empty());
- Builder.CreateCall(ReadHazard, Locals.begin(), Locals.end())
- ->setDoesNotThrow();
+ Builder.CreateCall(ReadHazard, Locals)->setDoesNotThrow();
}
/// Emit read hazards in all the protected blocks, i.e. all the blocks
@@ -6048,12 +6046,10 @@
llvm::Value *Exception = CGF.EmitScalarExpr(ThrowExpr);
Exception = CGF.Builder.CreateBitCast(Exception, ObjCTypes.ObjectPtrTy,
"tmp");
- llvm::Value *Args[] = { Exception };
- CGF.EmitCallOrInvoke(ObjCTypes.getExceptionThrowFn(),
- Args, Args+1)
+ CGF.EmitCallOrInvoke(ObjCTypes.getExceptionThrowFn(), Exception)
.setDoesNotReturn();
} else {
- CGF.EmitCallOrInvoke(ObjCTypes.getExceptionRethrowFn(), 0, 0)
+ CGF.EmitCallOrInvoke(ObjCTypes.getExceptionRethrowFn())
.setDoesNotReturn();
}