mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
Fix a 64-bit problem, passing (int)0 through ... instead of (void*)0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22206 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -116,14 +116,14 @@ bool LowerInvoke::doInitialization(Module &M) {
|
|||||||
Constant::getNullValue(PtrJBList),
|
Constant::getNullValue(PtrJBList),
|
||||||
"llvm.sjljeh.jblist", &M);
|
"llvm.sjljeh.jblist", &M);
|
||||||
SetJmpFn = M.getOrInsertFunction("llvm.setjmp", Type::IntTy,
|
SetJmpFn = M.getOrInsertFunction("llvm.setjmp", Type::IntTy,
|
||||||
PointerType::get(JmpBufTy), 0);
|
PointerType::get(JmpBufTy), NULL);
|
||||||
LongJmpFn = M.getOrInsertFunction("llvm.longjmp", Type::VoidTy,
|
LongJmpFn = M.getOrInsertFunction("llvm.longjmp", Type::VoidTy,
|
||||||
PointerType::get(JmpBufTy),
|
PointerType::get(JmpBufTy),
|
||||||
Type::IntTy, 0);
|
Type::IntTy, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need the 'write' and 'abort' functions for both models.
|
// We need the 'write' and 'abort' functions for both models.
|
||||||
AbortFn = M.getOrInsertFunction("abort", Type::VoidTy, 0);
|
AbortFn = M.getOrInsertFunction("abort", Type::VoidTy, NULL);
|
||||||
|
|
||||||
// Unfortunately, 'write' can end up being prototyped in several different
|
// Unfortunately, 'write' can end up being prototyped in several different
|
||||||
// ways. If the user defines a three (or more) operand function named 'write'
|
// ways. If the user defines a three (or more) operand function named 'write'
|
||||||
@ -140,7 +140,7 @@ bool LowerInvoke::doInitialization(Module &M) {
|
|||||||
WriteFn = 0;
|
WriteFn = 0;
|
||||||
} else {
|
} else {
|
||||||
WriteFn = M.getOrInsertFunction("write", Type::VoidTy, Type::IntTy,
|
WriteFn = M.getOrInsertFunction("write", Type::VoidTy, Type::IntTy,
|
||||||
VoidPtrTy, Type::IntTy, 0);
|
VoidPtrTy, Type::IntTy, NULL);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user