[PATCH] D97982: [MC] Introduce NeverAlign fragment type
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 19:25:21 PDT 2021
skan added inline comments.
================
Comment at: llvm/lib/MC/MCAssembler.cpp:354-355
+ size_t NextFragSize = 0;
+ if (const auto *NextFrag = dyn_cast<MCRelaxableFragment>(NF)) {
+ NextFragSize = NextFrag->getContents().size();
+ } else if (const auto *NextFrag = dyn_cast<MCDataFragment>(NF)) {
----------------
You can add test case like
```
.L0:
.nops 57
int3
.avoid_end_align 64
cmpl $(.L1-.L0), %eax
je .L0
.nops 65
.L1:
```
to check the situation where the fragment after NeverAlign is a RelaxableFragment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97982/new/
https://reviews.llvm.org/D97982
More information about the llvm-commits
mailing list