HomePhabricator

[BasicBlockSections] Make sure that the labels for address-taken blocks are…

Authored by rahmanl on Oct 7 2020, 1:21 PM.

Description

[BasicBlockSections] Make sure that the labels for address-taken blocks are emitted after switching the seciton.

Currently, AsmPrinter code is organized in a way in which the labels of address-taken blocks are emitted in the previous section, which makes the relocation incorrect.
This patch reorganizes the code to switch to the basic block section before handling address-taken blocks.

Reviewed By: snehasish, MaskRay

Differential Revision: https://reviews.llvm.org/D88517