[all-commits] [llvm/llvm-project] e59e39: [MC] Simplify the logic of applying fixup for frag...
KanRobert via All-commits
all-commits at lists.llvm.org
Thu Jul 9 01:40:02 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: e59e39b7c4092ead733d25e7801429fd9dab7007
https://github.com/llvm/llvm-project/commit/e59e39b7c4092ead733d25e7801429fd9dab7007
Author: Shengchen Kan <shengchen.kan at intel.com>
Date: 2020-07-09 (Thu, 09 Jul 2020)
Changed paths:
M llvm/lib/MC/MCAssembler.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list