Stupid error: If the LSDA and Personality functions aren't there, emit 0 instead
authorBill Wendling <isanbard@gmail.com>
Wed, 29 Jun 2011 23:53:16 +0000 (23:53 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 29 Jun 2011 23:53:16 +0000 (23:53 +0000)
of the encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134117 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCDwarf.cpp

index 14a108158e7dcec59f47222f9d557746bda66a8b..d4a223443325ff4978c6c7900a7aeb01c940709c 100644 (file)
@@ -670,20 +670,18 @@ bool FrameEmitterImpl::EmitCompactUnwind(MCStreamer &Streamer,
   Streamer.EmitAbsValue(Range, Size);
 
   // Personality Function
-  if (Frame.Personality) {
-    Size = getSizeForEncoding(Streamer, Frame.PersonalityEncoding);
+  Size = getSizeForEncoding(Streamer, Frame.PersonalityEncoding);
+  if (Frame.Personality)
     Streamer.EmitSymbolValue(Frame.Personality, Size);
-  } else {
-    Streamer.EmitIntValue(Frame.PersonalityEncoding, 0); // No personality fn
-  }
+  else
+    Streamer.EmitIntValue(0, Size); // No personality fn
 
   // LSDA
-  if (Frame.Lsda) {
-    Size = getSizeForEncoding(Streamer, Frame.LsdaEncoding);
+  Size = getSizeForEncoding(Streamer, Frame.LsdaEncoding);
+  if (Frame.Lsda)
     Streamer.EmitSymbolValue(Frame.Lsda, Size);
-  } else {
-    Streamer.EmitIntValue(Frame.LsdaEncoding, 0); // No LSDA
-  }
+  else
+    Streamer.EmitIntValue(0, Size); // No LSDA
 
   return true;
 #endif