diff options
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/COFF.h | 3 | ||||
-rw-r--r-- | include/llvm/Support/Win64EH.h | 18 |
2 files changed, 16 insertions, 5 deletions
diff --git a/include/llvm/Support/COFF.h b/include/llvm/Support/COFF.h index 02c44cdfad..823b43ad93 100644 --- a/include/llvm/Support/COFF.h +++ b/include/llvm/Support/COFF.h @@ -321,7 +321,8 @@ namespace COFF { IMAGE_COMDAT_SELECT_SAME_SIZE, IMAGE_COMDAT_SELECT_EXACT_MATCH, IMAGE_COMDAT_SELECT_ASSOCIATIVE, - IMAGE_COMDAT_SELECT_LARGEST + IMAGE_COMDAT_SELECT_LARGEST, + IMAGE_COMDAT_SELECT_NEWEST }; // Auxiliary Symbol Formats diff --git a/include/llvm/Support/Win64EH.h b/include/llvm/Support/Win64EH.h index 164aca16bf..ecce713680 100644 --- a/include/llvm/Support/Win64EH.h +++ b/include/llvm/Support/Win64EH.h @@ -106,12 +106,17 @@ struct UnwindInfo { return reinterpret_cast<void *>(&UnwindCodes[(NumCodes+1) & ~1]); } - /// \brief Return image-relativ offset of language-specific exception handler. - uint32_t getLanguageSpecificHandlerOffset() { - return *reinterpret_cast<uint32_t *>(getLanguageSpecificData()); + /// \brief Return pointer to language specific data part of UnwindInfo. + const void *getLanguageSpecificData() const { + return reinterpret_cast<const void *>(&UnwindCodes[(NumCodes+1) & ~1]); + } + + /// \brief Return image-relative offset of language-specific exception handler. + uint32_t getLanguageSpecificHandlerOffset() const { + return *reinterpret_cast<const uint32_t *>(getLanguageSpecificData()); } - /// \brief Set image-relativ offset of language-specific exception handler. + /// \brief Set image-relative offset of language-specific exception handler. void setLanguageSpecificHandlerOffset(uint32_t offset) { *reinterpret_cast<uint32_t *>(getLanguageSpecificData()) = offset; } @@ -126,6 +131,11 @@ struct UnwindInfo { RuntimeFunction *getChainedFunctionEntry() { return reinterpret_cast<RuntimeFunction *>(getLanguageSpecificData()); } + + /// \brief Return pointer to chained unwind info. + const RuntimeFunction *getChainedFunctionEntry() const { + return reinterpret_cast<const RuntimeFunction *>(getLanguageSpecificData()); + } }; |