diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-15 08:37:34 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-15 08:37:34 +0000 |
commit | 5bd375a6cc2e7518c4cfb881b0c5c42f8b78f947 (patch) | |
tree | 553cd8a3d226b446ce65aadcd67020d47f2e666a /llvm/lib/CodeGen | |
parent | 6730e4d904d02814325a370d06eb01880009730f (diff) | |
download | bcm5719-llvm-5bd375a6cc2e7518c4cfb881b0c5c42f8b78f947.tar.gz bcm5719-llvm-5bd375a6cc2e7518c4cfb881b0c5c42f8b78f947.zip |
Convert CallInst and InvokeInst APIs to use ArrayRef.
llvm-svn: 135265
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/DwarfEHPrepare.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/ShadowStackGC.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/StackProtector.cpp | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp index 46a88842983..03604b0a170 100644 --- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp +++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp @@ -336,8 +336,7 @@ bool DwarfEHPrepare::HandleURoRInvokes() { Args.push_back(EHCatchAllValue->getInitializer()); // Catch-all indicator. CallInst *NewSelector = - CallInst::Create(SelectorIntrinsic, Args.begin(), Args.end(), - "eh.sel.catch.all", II); + CallInst::Create(SelectorIntrinsic, Args, "eh.sel.catch.all", II); NewSelector->setTailCall(II->isTailCall()); NewSelector->setAttributes(II->getAttributes()); diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 3313181a619..611886ff16a 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -77,7 +77,7 @@ static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI, IRBuilder<> Builder(CI->getParent(), CI); SmallVector<Value *, 8> Args(ArgBegin, ArgEnd); - CallInst *NewCI = Builder.CreateCall(FCache, Args.begin(), Args.end()); + CallInst *NewCI = Builder.CreateCall(FCache, Args); NewCI->setName(CI->getName()); if (!CI->use_empty()) CI->replaceAllUsesWith(NewCI); diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp index d7c9adad7f5..5a253a4d97e 100644 --- a/llvm/lib/CodeGen/ShadowStackGC.cpp +++ b/llvm/lib/CodeGen/ShadowStackGC.cpp @@ -165,8 +165,7 @@ namespace { InvokeInst *II = InvokeInst::Create(CI->getCalledValue(), NewBB, CleanupBB, - Args.begin(), Args.end(), - CI->getName(), CallBB); + Args, CI->getName(), CallBB); II->setCallingConv(CI->getCallingConv()); II->setAttributes(CI->getAttributes()); CI->replaceAllUsesWith(II); diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index f0a44abaf5c..d3cbd15b64e 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -186,7 +186,7 @@ bool StackProtector::InsertStackProtectors() { Value *Args[] = { LI, AI }; CallInst:: Create(Intrinsic::getDeclaration(M, Intrinsic::stackprotector), - &Args[0], array_endof(Args), "", InsPt); + Args, "", InsPt); // Create the basic block to jump to when the guard check fails. FailBB = CreateFailBB(); |