Fix the interpreter crash that Michael McCracken found

llvm-svn: 17239
This commit is contained in:
Chris Lattner 2004-10-26 05:35:14 +00:00
parent b56cb729bd
commit d7a7a3f42f
1 changed files with 1 additions and 0 deletions

View File

@ -170,6 +170,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
///
GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
GenericValue Result;
if (isa<UndefValue>(C)) return Result;
if (ConstantExpr *CE = const_cast<ConstantExpr*>(dyn_cast<ConstantExpr>(C))) {
switch (CE->getOpcode()) {