[PATCH] D72315: [NFC] Simplifying the condition which kind of MCFragment doesn't need to handle fixup
Jim Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 01:17:04 PST 2020
Jim marked 2 inline comments as done.
Jim added inline comments.
================
Comment at: llvm/include/llvm/MC/MCFragment.h:139
case MCFragment::FT_DwarfFrame:
+ case MCFragment::FT_CVDefRange:
return true;
----------------
efriedma wrote:
> This seems obvious given the inheritance structure.
MCCVDefRangeFragment inherits MCEncodedFragmentWithFixups.
MCEncodedFragmentWithFixups inherits MCEncodedFragmentWithContents.
MCEncodedFragmentWithContents inherits MCEncodedFragment.
So MCCVDefRangeFragment is kind of MCEncodedFragment.
================
Comment at: llvm/include/llvm/MC/MCFragment.h:220
static bool classof(const MCFragment *F) {
MCFragment::FragmentType Kind = F->getKind();
----------------
efriedma wrote:
> MCEncodedFragmentWithFixups::classof is wrong; it allows incorrect casts.
I don't understand why it is wrong? Thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72315/new/
https://reviews.llvm.org/D72315
More information about the llvm-commits
mailing list