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 | 6f335f905c76187a7baf70a227fa843061473afe (patch) | |
tree | 2559afaf4206f2143fdeaf0153be14b03f6e9eab /lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | ad3c74fc9b52b652859807580c8e40b67394d689 (diff) |
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
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 208f8e2e83..7fb4ad3ae8 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/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()) { |