mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 03:06:28 +00:00
For PR1486:
Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth to be set to 0 (illegal) producing a subsequent assert. llvm-svn: 37391
This commit is contained in:
parent
bdacf6c9c9
commit
9baf82d943
@ -610,7 +610,7 @@ void Interpreter::popStackAndReturnValueToCaller (const Type *RetTy,
|
||||
if (RetTy && RetTy->isInteger()) { // Nonvoid return type?
|
||||
ExitValue = Result; // Capture the exit value of the program
|
||||
} else {
|
||||
memset(&ExitValue, 0, sizeof(ExitValue));
|
||||
memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
|
||||
}
|
||||
} else {
|
||||
// If we have a previous stack frame, and we have a previous call,
|
||||
|
@ -54,7 +54,7 @@ ExecutionEngine *Interpreter::create(ModuleProvider *MP, std::string* ErrStr) {
|
||||
//
|
||||
Interpreter::Interpreter(Module *M) : ExecutionEngine(M), TD(M) {
|
||||
|
||||
memset(&ExitValue, 0, sizeof(ExitValue));
|
||||
memset(&ExitValue.Untyped, 0, sizeof(ExitValue.Untyped));
|
||||
setTargetData(&TD);
|
||||
// Initialize the "backend"
|
||||
initializeExecutionEngine();
|
||||
|
Loading…
x
Reference in New Issue
Block a user