mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Implement cast operations on booleans to allow casting bools to ints, f.e.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9705a15b1a
commit
f4dca807d8
@ -682,7 +682,7 @@ void Interpreter::executeRetInst(ReturnInst *I, ExecutionContext &SF) {
|
||||
}
|
||||
|
||||
if (RetTy->isIntegral())
|
||||
ExitCode = Result.SByteVal; // Capture the exit code of the program
|
||||
ExitCode = Result.IntVal; // Capture the exit code of the program
|
||||
} else {
|
||||
ExitCode = 0;
|
||||
}
|
||||
@ -963,6 +963,7 @@ static void executeShrInst(ShiftInst *I, ExecutionContext &SF) {
|
||||
#define IMPLEMENT_CAST_CASE_START(DESTTY, DESTCTY) \
|
||||
case Type::DESTTY##TyID: \
|
||||
switch (SrcTy->getPrimitiveID()) { \
|
||||
IMPLEMENT_CAST(DESTTY, DESTCTY, Bool); \
|
||||
IMPLEMENT_CAST(DESTTY, DESTCTY, UByte); \
|
||||
IMPLEMENT_CAST(DESTTY, DESTCTY, SByte); \
|
||||
IMPLEMENT_CAST(DESTTY, DESTCTY, UShort); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user