mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Fix the interpreter crash that Michael McCracken found
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad3c74fc9b
commit
6f335f905c
@ -170,6 +170,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
|
|||||||
///
|
///
|
||||||
GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||||
GenericValue Result;
|
GenericValue Result;
|
||||||
|
if (isa<UndefValue>(C)) return Result;
|
||||||
|
|
||||||
if (ConstantExpr *CE = const_cast<ConstantExpr*>(dyn_cast<ConstantExpr>(C))) {
|
if (ConstantExpr *CE = const_cast<ConstantExpr*>(dyn_cast<ConstantExpr>(C))) {
|
||||||
switch (CE->getOpcode()) {
|
switch (CE->getOpcode()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user