diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-26 05:35:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-26 05:35:14 +0000 |
commit | d7a7a3f42f0bf675d98ce637529d3ccd0e469fad (patch) | |
tree | d64a3bda5540355e21c5e146ef0a9bacf415bbe4 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | b56cb729bddaf738f266ad80a01a70e37d746f06 (diff) | |
download | bcm5719-llvm-d7a7a3f42f0bf675d98ce637529d3ccd0e469fad.tar.gz bcm5719-llvm-d7a7a3f42f0bf675d98ce637529d3ccd0e469fad.zip |
Fix the interpreter crash that Michael McCracken found
llvm-svn: 17239
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 208f8e2e834..7fb4ad3ae81 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -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()) { |