mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 21:36:06 +00:00
[MC] Replace one nullable getCurrentSectionOnly with CurFrag
We will implement getCurrentSectionOnly with `CurFrag->getParent()`, which is non-null. Eliminate a nullable use.
This commit is contained in:
parent
fadc72235e
commit
fcffb2c024
@ -628,8 +628,8 @@ void MCELFStreamer::finishImpl() {
|
||||
}
|
||||
|
||||
// Ensure the last section gets aligned if necessary.
|
||||
MCSection *CurSection = getCurrentSectionOnly();
|
||||
setSectionAlignmentForBundling(getAssembler(), CurSection);
|
||||
if (MCFragment *F = getCurrentFragment())
|
||||
setSectionAlignmentForBundling(getAssembler(), F->getParent());
|
||||
|
||||
finalizeCGProfile();
|
||||
emitFrames(nullptr);
|
||||
|
@ -143,7 +143,8 @@ void MCObjectStreamer::emitFrames(MCAsmBackend *MAB) {
|
||||
}
|
||||
|
||||
MCFragment *MCObjectStreamer::getCurrentFragment() const {
|
||||
assert(CurFrag->getParent() == getCurrentSection().first);
|
||||
assert(!getCurrentSection().first ||
|
||||
CurFrag->getParent() == getCurrentSection().first);
|
||||
return CurFrag;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user