mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
Eliminate use of ctors that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/ADT/DepthFirstIterator.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
@@ -188,8 +189,8 @@ bool ADCE::doADCE() {
|
||||
if (AA.onlyReadsMemory(F)) {
|
||||
// The function cannot unwind. Convert it to a call with a branch
|
||||
// after it to the normal destination.
|
||||
std::vector<Value*> Args(II->op_begin()+3, II->op_end());
|
||||
CallInst *NewCall = new CallInst(F, Args, "", II);
|
||||
SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end());
|
||||
CallInst *NewCall = new CallInst(F, &Args[0], Args.size(), "", II);
|
||||
NewCall->takeName(II);
|
||||
NewCall->setCallingConv(II->getCallingConv());
|
||||
II->replaceAllUsesWith(NewCall);
|
||||
|
||||
Reference in New Issue
Block a user