aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/Win64EH.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/Win64EH.h')
-rw-r--r--include/llvm/Support/Win64EH.h18
1 files changed, 14 insertions, 4 deletions
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());
+ }
};