[llvm] r181355 - Remove redundant check and use cached FrameArray values.
Bob Wilson
bob.wilson at apple.com
Tue May 7 13:56:33 PDT 2013
Author: bwilson
Date: Tue May 7 15:56:33 2013
New Revision: 181355
URL: http://llvm.org/viewvc/llvm-project?rev=181355&view=rev
Log:
Remove redundant check and use cached FrameArray values.
No functional change.
Modified:
llvm/trunk/lib/MC/MCDwarf.cpp
Modified: llvm/trunk/lib/MC/MCDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=181355&r1=181354&r2=181355&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDwarf.cpp (original)
+++ llvm/trunk/lib/MC/MCDwarf.cpp Tue May 7 15:56:33 2013
@@ -1480,20 +1480,16 @@ void MCDwarfFrameEmitter::Emit(MCStreame
// 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);
}
}
More information about the llvm-commits
mailing list