[llvm-commits] [llvm] r81408 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Bill Wendling isanbard at gmail.com
Wed Sep 9 17:13:17 PDT 2009


Author: void
Date: Wed Sep  9 19:13:16 2009
New Revision: 81408

URL: http://llvm.org/viewvc/llvm-project?rev=81408&view=rev
Log:
Use the SizeOfEncodedValue function instead of magic variables for the
sizeof(DW_EH_PE_udata4).

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=81408&r1=81407&r2=81408&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Wed Sep  9 19:13:16 2009
@@ -594,15 +594,14 @@
   // Final tallies.
 
   // Call sites.
-  const unsigned SiteStartSize  = sizeof(int32_t); // DW_EH_PE_udata4
-  const unsigned SiteLengthSize = sizeof(int32_t); // DW_EH_PE_udata4
-  const unsigned LandingPadSize = sizeof(int32_t); // DW_EH_PE_udata4
+  const unsigned SiteStartSize  = SizeOfEncodedValue(dwarf::DW_EH_PE_udata4);
+  const unsigned SiteLengthSize = SizeOfEncodedValue(dwarf::DW_EH_PE_udata4);
+  const unsigned LandingPadSize = SizeOfEncodedValue(dwarf::DW_EH_PE_udata4);
   unsigned SizeSites;
 
   bool HaveTTData = (MAI->getExceptionHandlingType() == ExceptionHandling::SjLj)
     ? (!TypeInfos.empty() || !FilterIds.empty()) : true;
 
-
   if (MAI->getExceptionHandlingType() == ExceptionHandling::SjLj) {
     SizeSites = 0;
   } else





More information about the llvm-commits mailing list