[AsmPrinter] Fix crash in handleIndirectSymViaGOTPCRel
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 25 Jun 2015 15:17:23 +0000 (15:17 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 25 Jun 2015 15:17:23 +0000 (15:17 +0000)
commit39b2e22f004ab206c85c6ac89c30282659c18709
tree733c59c3884da5428ef669df4eb67fca42df3806
parent8eb93196be21c8a1e15789329d2598f1b3ef935a
[AsmPrinter] Fix crash in handleIndirectSymViaGOTPCRel

Check for symbols in MCValue before using them. Bail out early in case
they are null. This fixes PR23779.

Differential Revision: http://reviews.llvm.org/D10712

rdar://problem/21532830

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240649 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
test/MC/MachO/cstexpr-gotpcrel-64.ll