diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-09-10 00:13:16 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-09-10 00:13:16 +0000 |
commit | 40121bccbee44d387ab5d6a5194c5fc27c542e12 (patch) | |
tree | 5fb2bc81ca6e62155b0537f5dbfce6edf1d8d516 /lib/CodeGen/AsmPrinter/DwarfException.cpp | |
parent | bb3e29932d14cc012149a1ab452b88e6f6f5bb49 (diff) |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfException.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index 166c2fee57..a41d1b00e4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -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 |