[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)
commitedb876d52c907d6d9de60f0a4502c491485f7b2f
treeaa3495a39871cc5ee1b222bf396742435cf422ca
parent549d405877de13141bcb73d7f93a86817143c476
[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

llvm-svn: 240649
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/MC/MachO/cstexpr-gotpcrel-64.ll