Micro-opt: Only emit compact unwind if there is a compact unwind encoding to emit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135452 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp
index ba3bda0..744d016 100644
--- a/lib/MC/MCDwarf.cpp
+++ b/lib/MC/MCDwarf.cpp
@@ -1022,7 +1022,7 @@
const MCSymbol *DummyDebugKey = NULL;
for (unsigned i = 0, n = Streamer.getNumFrameInfos(); i < n; ++i) {
const MCDwarfFrameInfo &Frame = Streamer.getFrameInfo(i);
- if (IsEH && TAI.getCompactUnwindSection() &&
+ if (IsEH && TAI.getCompactUnwindSection() && Frame.CompactUnwindEncoding &&
Emitter.EmitCompactUnwind(Streamer, Frame)) {
FDEEnd = NULL;
continue;