Remove redundant check and use cached FrameArray values.

No functional change.

llvm-svn: 181355
This commit is contained in:
Bob Wilson 2013-05-07 20:56:33 +00:00
parent 9a383405a7
commit 0e180f254b
1 changed files with 8 additions and 12 deletions

View File

@ -1480,12 +1480,9 @@ 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);
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());
@ -1495,7 +1492,6 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
Emitter.EmitCompactUnwind(Streamer, Frame);
}
}
}
const MCSection &Section = IsEH ? *MOFI->getEHFrameSection() :
*MOFI->getDwarfFrameSection();