HomePhabricator

[MC] Simplify the logic of applying fixup for fragments, NFCI
Audit Requirede59e39b7c409

Authored by skan on Jul 9 2020, 12:06 AM.

Description

[MC] Simplify the logic of applying fixup for fragments, NFCI

Replace mutiple if else clauses with a switch clause and remove redundant checks. Before this patch, we need to add a statement like if(!isa<MCxxxFragment>(Frag)) here each time we add a new kind of MCEncodedFragment even if it has no fixups. After this patch, we don't need to do that.

Reviewed By: MaskRay

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

Details

Auditors
grosbach
Committed
skanJul 9 2020, 1:39 AM
Reviewer
MaskRay
Differential Revision
D83366: [MC] Simplify the logic of applying fixup for fragments, NFCI
Parents
rGa60c31fd6229: Fix return status of AtomicExpandPass
Branches
Unknown
Tags
Unknown