mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
improve the APIs for creating struct and function types with no arguments/elements
to not have to create a temporary vector (in the API at least). Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -89,7 +89,7 @@ bool LowerAllocations::doInitialization(Module &M) {
|
||||
const Type *BPTy = PointerType::getUnqual(Type::Int8Ty);
|
||||
// Prototype malloc as "char* malloc(...)", because we don't know in
|
||||
// doInitialization whether size_t is int or long.
|
||||
FunctionType *FT = FunctionType::get(BPTy, std::vector<const Type*>(), true);
|
||||
FunctionType *FT = FunctionType::get(BPTy, true);
|
||||
MallocFunc = M.getOrInsertFunction("malloc", FT);
|
||||
FreeFunc = M.getOrInsertFunction("free" , Type::VoidTy, BPTy, (Type *)0);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user