summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-26 05:35:14 +0000
committerChris Lattner <sabre@nondot.org>2004-10-26 05:35:14 +0000
commitd7a7a3f42f0bf675d98ce637529d3ccd0e469fad (patch)
treed64a3bda5540355e21c5e146ef0a9bacf415bbe4 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp
parentb56cb729bddaf738f266ad80a01a70e37d746f06 (diff)
downloadbcm5719-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.cpp1
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()) {
OpenPOWER on IntegriCloud