projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9705a15
)
Implement cast operations on booleans to allow casting bools to ints, f.e.
author
Chris Lattner
<sabre@nondot.org>
Thu, 2 May 2002 19:28:45 +0000
(19:28 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 2 May 2002 19:28:45 +0000
(19:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2437
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/ExecutionEngine/Interpreter/Execution.cpp
patch
|
blob
|
history
diff --git
a/lib/ExecutionEngine/Interpreter/Execution.cpp
b/lib/ExecutionEngine/Interpreter/Execution.cpp
index fa6129876270a057327f1a4436387d9b660d452a..6254293ad7f617f1c501100bead62378c919f0cc 100644
(file)
--- a/
lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/
lib/ExecutionEngine/Interpreter/Execution.cpp
@@
-682,7
+682,7
@@
void Interpreter::executeRetInst(ReturnInst *I, ExecutionContext &SF) {
}
if (RetTy->isIntegral())
- ExitCode = Result.
SByte
Val; // Capture the exit code of the program
+ ExitCode = Result.
Int
Val; // 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); \