[AsmPrinter] Check for valid constants in handleIndirectSymViaGOTPCRel
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 21 Jul 2015 21:45:42 +0000 (21:45 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 21 Jul 2015 21:45:42 +0000 (21:45 +0000)
commite8640518a983eccbe7990885acf53bd6976c5067
tree421d189af1033cd1d64ac1e3cb6dc651d621ce63
parent402a4f10886cf3ceee58f5614df9606f719d6793
[AsmPrinter] Check for valid constants in handleIndirectSymViaGOTPCRel

Check whether BaseCst is valid before extracting a GlobalValue.
This fixes PR24163.

Patch by David Majnemer.

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