Use the SizeOfEncodedValue function instead of magic variables for the

sizeof(DW_EH_PE_udata4).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2009-09-10 00:13:16 +00:00
parent bb3e29932d
commit 40121bccbe

View File

@ -594,15 +594,14 @@ void DwarfException::EmitExceptionTable() {
// 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