[llvm-commits] [llvm] r40660 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/CodeGen/ lib/ExecutionEngine/JIT/ lib/Transforms/IPO/ lib/Transforms/Instrumentation/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/ tools/bugpoint/ tools/llvm-upgrade/

Chris Lattner clattner at apple.com
Wed Aug 1 20:01:22 CDT 2007


> New CallInst interface to address GLIBCXX_DEBUG errors caused by
> indexing an empty std::vector.

Cool.  This broke an llvm2cpp dejagnu test.  Please investigate it.   
Also:

> ====================================================================== 
> ========
> --- llvm/trunk/include/llvm/Instructions.h (original)
> +++ llvm/trunk/include/llvm/Instructions.h Tue Jul 31 22:43:44 2007
> @@ -16,7 +16,10 @@
>  #ifndef LLVM_INSTRUCTIONS_H
>  #define LLVM_INSTRUCTIONS_H
>
> +#include <iterator>
> +
>  #include "llvm/InstrTypes.h"
> +#include "llvm/DerivedTypes.h"

Please try to find some way to do this without bringing in  
DerivedTypes.h.  What do you need this for?

> +#if 0
> +  // Leave these here for llvm-gcc
>    CallInst(Value *F, Value* const *Args, unsigned NumArgs,
>             const std::string &Name = "", Instruction *InsertBefore  
> = 0);
>    CallInst(Value *F, Value *const *Args, unsigned NumArgs,
>             const std::string &Name, BasicBlock *InsertAtEnd);
> -
> +
>    // Alternate CallInst ctors w/ two actuals, w/ one actual and no
>    // actuals, respectively.
>    CallInst(Value *F, Value *Actual1, Value *Actual2,
>             const std::string& Name = "", Instruction *InsertBefore  
> = 0);
>    CallInst(Value *F, Value *Actual1, Value *Actual2,
>             const std::string& Name, BasicBlock *InsertAtEnd);
> +#endif

Please remove the #ifdef'd out code.

> ====================================================================== 
> ========
> --- llvm/trunk/include/llvm/Support/LLVMBuilder.h (original)
> +++ llvm/trunk/include/llvm/Support/LLVMBuilder.h Tue Jul 31  
> 22:43:44 2007
> +#if 0
> +   CallInst *CreateCall(Value *Callee, Value *Arg0, Value *Arg1,
> +                        const char *Name = "") {
> +     Value *Args[] = { Arg0, Arg1 };
> +     return Insert(new CallInst(Callee, Args, Args+2, Name));
> +   }
> +
> +  // Leave this here for llvm-gcc
>    CallInst *CreateCall(Value *Callee, Value* const *Args, unsigned  
> NumArgs,
>                         const char *Name = "") {
> -    return Insert(new CallInst(Callee, Args, NumArgs, Name));
> +    return Insert(new CallInst(Callee, Args, Args+NumArgs, Name));
>    }
> +#endif

Likewise.

-Chris




More information about the llvm-commits mailing list