[DebugInfo] Avoid triggering global location assert for 2-byte pointer sizes.
authorJack Andersen <jackoalan@gmail.com>
Tue, 4 Jan 2022 20:16:36 +0000 (15:16 -0500)
committerJack Andersen <jackoalan@gmail.com>
Tue, 4 Jan 2022 20:16:36 +0000 (15:16 -0500)
commit5b1337184bfb12dd0ec9141765d57677438005b7
treeafd304245ddcedd567a3438ffec3aeca9c71ffb6
parent41760a6b40c1f14e0622aea4a2ee4b4a93c40ec1
[DebugInfo] Avoid triggering global location assert for 2-byte pointer sizes.

D111404 moved a 4/8 byte check assert into a block taken by 2-byte platforms.
Since these platforms do not take the branches where the pointer size is used,
sink the assert accordingly.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D116480
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/test/DebugInfo/MSP430/global-var.ll [new file with mode: 0644]