summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5fb1fee605240fb1c44a473a1d009be3d69fb87c (patch)
treed9d2fe97f042a9c9b2342831639a95a9c4b349cc /llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
parente3cbedbd3edd9836251fe22e062204bdd810c049 (diff)
downloadbcm5719-llvm-5fb1fee605240fb1c44a473a1d009be3d69fb87c.tar.gz
bcm5719-llvm-5fb1fee605240fb1c44a473a1d009be3d69fb87c.zip
Fix a bug I introduced into the code generator. :(
llvm-svn: 3694
Diffstat (limited to 'llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r--llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 036b1a7f3f2..c651f016fe0 100644
--- a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud