[PATCH] D72315: [NFC] Simplifying the condition which kind of MCFragment doesn't need to handle fixup
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 15:53:09 PST 2020
efriedma added a comment.
Did you audit the other uses of `dyn_cast<MCEncodedFragment>`
================
Comment at: llvm/include/llvm/MC/MCFragment.h:139
case MCFragment::FT_DwarfFrame:
+ case MCFragment::FT_CVDefRange:
return true;
----------------
This seems obvious given the inheritance structure.
================
Comment at: llvm/include/llvm/MC/MCFragment.h:220
static bool classof(const MCFragment *F) {
MCFragment::FragmentType Kind = F->getKind();
----------------
MCEncodedFragmentWithFixups::classof is wrong; it allows incorrect casts.
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