aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-12 20:27:10 +0000
committerChris Lattner <sabre@nondot.org>2002-09-12 20:27:10 +0000
commit597f81fea26716ea024072bc154395d773b08567 (patch)
treeb5af9a79f4200b781714f8157b9b27aeeb751c97 /lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
parent9ebf51679ea72d3a14b586c3e99cb0e47416d7aa (diff)
Fix a bug I introduced into the code generator. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 036b1a7f3f..c651f016fe 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -114,7 +114,7 @@ FoldGetElemChain(InstrTreeNode* ptrNode, vector<Value*>& chainIdxVec)
{
InstructionNode* gepNode = dyn_cast<InstructionNode>(ptrNode);
GetElementPtrInst* gepInst =
- dyn_cast_or_null<GetElementPtrInst>(gepNode->getInstruction());
+ dyn_cast_or_null<GetElementPtrInst>(gepNode ? gepNode->getInstruction() :0);
// ptr value is not computed in this tree or ptr value does not come from GEP
// instruction