[go: nahoru, domu]

Skip to content

Commit

Permalink
[MC] Remove unneeded nullness check from getOrCreateDataFragment. NFC
Browse files Browse the repository at this point in the history
`getCurrentFragment()` no longer returns null after
7423bf7.
  • Loading branch information
MaskRay committed Jun 28, 2024
1 parent d38b518 commit eaf816f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/MC/MCObjectStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static bool canReuseDataFragment(const MCDataFragment &F,

MCDataFragment *
MCObjectStreamer::getOrCreateDataFragment(const MCSubtargetInfo *STI) {
MCDataFragment *F = dyn_cast_or_null<MCDataFragment>(getCurrentFragment());
auto *F = dyn_cast<MCDataFragment>(getCurrentFragment());
if (!F || !canReuseDataFragment(*F, *Assembler, STI)) {
F = getContext().allocFragment<MCDataFragment>();
insert(F);
Expand Down

0 comments on commit eaf816f

Please sign in to comment.