diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-10-31 20:47:30 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-10-31 20:47:30 +0000 |
| commit | e337e6055211699c4f1b061a92a93e3c08cb426e (patch) | |
| tree | aa1b69f29fe7f1e5fa2d4cc7626c131be5b677ee | |
| parent | d2f7e5086779f4d8eb5e41cf3d5fd46ad28b69ea (diff) | |
| download | bcm5719-llvm-e337e6055211699c4f1b061a92a93e3c08cb426e.tar.gz bcm5719-llvm-e337e6055211699c4f1b061a92a93e3c08cb426e.zip | |
Fix cl brokeness.
cl is not attempting to complete a templated class when used in this
context. The conversion forces this to happen.
Thanks to Richard Smith for figuring this out.
llvm-svn: 167166
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/HexagonReference.cpp | 10 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/PPCReference.cpp | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/X86Reference.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lld/lib/ReaderWriter/ELF/HexagonReference.cpp b/lld/lib/ReaderWriter/ELF/HexagonReference.cpp index 0024c197b99..9883203da26 100644 --- a/lld/lib/ReaderWriter/ELF/HexagonReference.cpp +++ b/lld/lib/ReaderWriter/ELF/HexagonReference.cpp @@ -46,7 +46,7 @@ int relocB22PCREL(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { if ((result < 0x200000) && (result > -0x200000)) { result = ((result<<1) & 0x3ffe) | ((result<<3) & 0x01ff0000); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result | - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return HexagonKindHandler::NoError; } return HexagonKindHandler::Overflow; @@ -58,7 +58,7 @@ int relocB15PCREL(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { if ((result < 0x8000) && (result > -0x8000)) { result = ((result<<1) & 0x20fe) | ((result<<7) & 0x00df0000); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result | - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return HexagonKindHandler::NoError; } return HexagonKindHandler::Overflow; @@ -69,7 +69,7 @@ int relocLO16(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { uint32_t result = (uint32_t)(S + A); result = ((result & 0x3fff) | ((result << 2) & 0x00c00000)); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result | - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return HexagonKindHandler::NoError; } @@ -78,7 +78,7 @@ int relocHI16(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { uint32_t result = (uint32_t)((S + A)>>16); result = ((result & 0x3fff) | ((result << 2) & 0x00c00000)); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result | - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return HexagonKindHandler::NoError; } @@ -86,7 +86,7 @@ int relocHI16(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { int reloc32(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { uint32_t result = (uint32_t)(S + A); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result | - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return HexagonKindHandler::NoError; } } // namespace hexagon diff --git a/lld/lib/ReaderWriter/ELF/PPCReference.cpp b/lld/lib/ReaderWriter/ELF/PPCReference.cpp index 01291e9f4e8..ec7df8f3a4c 100644 --- a/lld/lib/ReaderWriter/ELF/PPCReference.cpp +++ b/lld/lib/ReaderWriter/ELF/PPCReference.cpp @@ -46,7 +46,7 @@ int relocB24PCREL(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { if ((result < 0x1000000) && (result > -0x1000000)) { result &= ~-(0x1000000); *reinterpret_cast<llvm::support::ubig32_t *>(location) = result | - *reinterpret_cast<llvm::support::ubig32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ubig32_t *>(location); return PPCKindHandler::NoError; } return PPCKindHandler::Overflow; diff --git a/lld/lib/ReaderWriter/ELF/X86Reference.cpp b/lld/lib/ReaderWriter/ELF/X86Reference.cpp index aae132cd6ed..7a9006ab07f 100644 --- a/lld/lib/ReaderWriter/ELF/X86Reference.cpp +++ b/lld/lib/ReaderWriter/ELF/X86Reference.cpp @@ -45,14 +45,14 @@ int relocNone(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { int reloc32(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { int32_t result = (uint32_t)(S + A); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result | - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return X86KindHandler::NoError; } /// \brief R_386_PC32 - word32: S + A - P int relocPC32(uint8_t *location, uint64_t P, uint64_t S, uint64_t A) { uint32_t result = (uint32_t)((S + A) - P); *reinterpret_cast<llvm::support::ulittle32_t *>(location) = result + - *reinterpret_cast<llvm::support::ulittle32_t *>(location); + (uint32_t)*reinterpret_cast<llvm::support::ulittle32_t *>(location); return X86KindHandler::NoError; } |

