]> granicus.if.org Git - llvm/commit
Sink all of the code relying on the MachO MachineModuleInfo to live
authorChandler Carruth <chandlerc@gmail.com>
Thu, 3 Nov 2016 23:33:46 +0000 (23:33 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 3 Nov 2016 23:33:46 +0000 (23:33 +0000)
commitc6a42bafd645cdfe5a777e480f3064c1d8d172f1
tree590f475c0a5d6469899f21ce49fa0de8458411ac
parent4373dd0316a6d3fa4572bfa9d1fbd9f83b80b865
Sink all of the code relying on the MachO MachineModuleInfo to live
behind the test that the MachineModuleInfo analysis was
actually available and can be used.

While the MachO bits may well be reasonable to assume in the darwin
assembly printer, the analysis isn't constructively guaranteed anywhere
I could find so it seems safest to avoid crashing here.

This issue was found with PVS-Studio. Pretty sure the Clang Static
Anaylzer flags similar issues but we've probably never pointed it at
this code effectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285972 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCAsmPrinter.cpp