diff options
author | David Greene <greened@obbligato.org> | 2007-08-01 03:43:44 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-08-01 03:43:44 +0000 |
commit | 52eec548206d0b135b55ba52dd0e82e978f15ae5 (patch) | |
tree | 1c9794c86069c19f235104ec8c2a6f91405552d2 /lib/VMCore | |
parent | 7fc77611eff7c47e8c37fad58af637138e2a9d7a (diff) | |
download | external_llvm-52eec548206d0b135b55ba52dd0e82e978f15ae5.zip external_llvm-52eec548206d0b135b55ba52dd0e82e978f15ae5.tar.gz external_llvm-52eec548206d0b135b55ba52dd0e82e978f15ae5.tar.bz2 |
New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.
Updates to all clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 7dfe5ae..5297374 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -267,19 +267,21 @@ void CallInst::init(Value *Func) { assert(FTy->getNumParams() == 0 && "Calling a function with bad signature"); } +#if 0 +// Leave for llvm-gcc CallInst::CallInst(Value *Func, Value* const *Args, unsigned NumArgs, const std::string &Name, BasicBlock *InsertAtEnd) : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType()) - ->getElementType())->getReturnType(), + ->getElementType())->getReturnType(), Instruction::Call, 0, 0, InsertAtEnd) { init(Func, Args, NumArgs); setName(Name); } CallInst::CallInst(Value *Func, Value* const *Args, unsigned NumArgs, const std::string &Name, Instruction *InsertBefore) -: Instruction(cast<FunctionType>(cast<PointerType>(Func->getType()) - ->getElementType())->getReturnType(), - Instruction::Call, 0, 0, InsertBefore) { + : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType()) + ->getElementType())->getReturnType(), + Instruction::Call, 0, 0, InsertBefore) { init(Func, Args, NumArgs); setName(Name); } @@ -301,7 +303,7 @@ CallInst::CallInst(Value *Func, Value *Actual1, Value *Actual2, init(Func, Actual1, Actual2); setName(Name); } - +#endif CallInst::CallInst(Value *Func, Value* Actual, const std::string &Name, Instruction *InsertBefore) : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType()) @@ -319,7 +321,6 @@ CallInst::CallInst(Value *Func, Value* Actual, const std::string &Name, init(Func, Actual); setName(Name); } - CallInst::CallInst(Value *Func, const std::string &Name, Instruction *InsertBefore) : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType()) |