diff options
author | Logan Chien <tzuhsiang.chien@gmail.com> | 2016-11-13 14:44:41 +0000 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2016-11-13 14:44:41 +0000 |
commit | 22012a59732547d8b00578378b05a2b12e3fefbc (patch) | |
tree | d4a7d9e4f0c3267412921751d1bc0f9f08adfde9 /libcxxabi/src | |
parent | 71cdd30e70534e21a3f352a57e79d5a1d5fbf76b (diff) | |
download | bcm5719-llvm-22012a59732547d8b00578378b05a2b12e3fefbc.tar.gz bcm5719-llvm-22012a59732547d8b00578378b05a2b12e3fefbc.zip |
arm: Fix ttype encoding assertion failure.
GCC 4.7 or newer emits 0x90 (indirect | pcrel) as the ttype encoding.
This would hit an assertion in cxa_personality.cpp. This commit fixes
the problem by relaxing the assertion.
llvm-svn: 286760
Diffstat (limited to 'libcxxabi/src')
-rw-r--r-- | libcxxabi/src/cxa_personality.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp index 0b75a1cbf2f..75f6b4a6868 100644 --- a/libcxxabi/src/cxa_personality.cpp +++ b/libcxxabi/src/cxa_personality.cpp @@ -348,7 +348,10 @@ get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, call_terminate(native_exception, unwind_exception); } - assert(ttypeEncoding == DW_EH_PE_absptr && "Unexpected TTypeEncoding"); + assert(((ttypeEncoding == DW_EH_PE_absptr) || // LLVM or GCC 4.6 + (ttypeEncoding == DW_EH_PE_pcrel) || // GCC 4.7 baremetal + (ttypeEncoding == (DW_EH_PE_pcrel | DW_EH_PE_indirect))) && // GCC 4.7 linux + "Unexpected TTypeEncoding"); (void)ttypeEncoding; const uint8_t* ttypePtr = classInfo - ttypeIndex * sizeof(uintptr_t); @@ -415,7 +418,10 @@ exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo, call_terminate(false, unwind_exception); } - assert(ttypeEncoding == DW_EH_PE_absptr && "Unexpected TTypeEncoding"); + assert(((ttypeEncoding == DW_EH_PE_absptr) || // LLVM or GCC 4.6 + (ttypeEncoding == DW_EH_PE_pcrel) || // GCC 4.7 baremetal + (ttypeEncoding == (DW_EH_PE_pcrel | DW_EH_PE_indirect))) && // GCC 4.7 linux + "Unexpected TTypeEncoding"); (void)ttypeEncoding; // specIndex is negative of 1-based byte offset into classInfo; |