From: Rui Ueyama Date: Wed, 5 Mar 2014 00:32:34 +0000 (+0000) Subject: Fix endianness bug. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e553a3ba42072f820e4eb9285189924dd3c1814f;p=oota-llvm.git Fix endianness bug. Looks like llvm-readobj is the only customer of this code, and apparently there's no test to cover this function. I'll write it after finishing plumbing from llvm-objdump to there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202915 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Win64EH.h b/include/llvm/Support/Win64EH.h index ecce7136804..8966c0d04eb 100644 --- a/include/llvm/Support/Win64EH.h +++ b/include/llvm/Support/Win64EH.h @@ -108,17 +108,20 @@ struct UnwindInfo { /// \brief Return pointer to language specific data part of UnwindInfo. const void *getLanguageSpecificData() const { - return reinterpret_cast(&UnwindCodes[(NumCodes+1) & ~1]); + return reinterpret_cast( + &UnwindCodes[(NumCodes + 1) & ~1]); } /// \brief Return image-relative offset of language-specific exception handler. uint32_t getLanguageSpecificHandlerOffset() const { - return *reinterpret_cast(getLanguageSpecificData()); + return *reinterpret_cast( + getLanguageSpecificData()); } /// \brief Set image-relative offset of language-specific exception handler. void setLanguageSpecificHandlerOffset(uint32_t offset) { - *reinterpret_cast(getLanguageSpecificData()) = offset; + *reinterpret_cast(getLanguageSpecificData()) = + offset; } /// \brief Return pointer to exception-specific data.