forked from OSchip/llvm-project
Remove redundant check and use cached FrameArray values.
No functional change. llvm-svn: 181355
This commit is contained in:
parent
9a383405a7
commit
0e180f254b
|
@ -1480,20 +1480,16 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
|||
|
||||
// Emit the compact unwind info if available.
|
||||
if (IsEH && MOFI->getCompactUnwindSection()) {
|
||||
unsigned NumFrameInfos = Streamer.getNumFrameInfos();
|
||||
bool SectionEmitted = false;
|
||||
|
||||
if (NumFrameInfos) {
|
||||
for (unsigned i = 0; i < NumFrameInfos; ++i) {
|
||||
const MCDwarfFrameInfo &Frame = Streamer.getFrameInfo(i);
|
||||
if (Frame.CompactUnwindEncoding == 0) continue;
|
||||
if (!SectionEmitted) {
|
||||
Streamer.SwitchSection(MOFI->getCompactUnwindSection());
|
||||
Streamer.EmitValueToAlignment(Context.getAsmInfo().getPointerSize());
|
||||
SectionEmitted = true;
|
||||
}
|
||||
Emitter.EmitCompactUnwind(Streamer, Frame);
|
||||
for (unsigned i = 0, n = FrameArray.size(); i < n; ++i) {
|
||||
const MCDwarfFrameInfo &Frame = FrameArray[i];
|
||||
if (Frame.CompactUnwindEncoding == 0) continue;
|
||||
if (!SectionEmitted) {
|
||||
Streamer.SwitchSection(MOFI->getCompactUnwindSection());
|
||||
Streamer.EmitValueToAlignment(Context.getAsmInfo().getPointerSize());
|
||||
SectionEmitted = true;
|
||||
}
|
||||
Emitter.EmitCompactUnwind(Streamer, Frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue