[llvm-commits] [llvm] r111848 - /llvm/trunk/lib/MC/ELFObjectWriter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Aug 23 14:32:00 PDT 2010
Author: d0k
Date: Mon Aug 23 16:32:00 2010
New Revision: 111848
URL: http://llvm.org/viewvc/llvm-project?rev=111848&view=rev
Log:
Fix thinko. Having no tests is great ...
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=111848&r1=111847&r2=111848&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Mon Aug 23 16:32:00 2010
@@ -152,12 +152,12 @@
void StringLE32(char *buf, uint32_t Value) {
StringLE16(buf, uint16_t(Value >> 0));
- StringLE16(buf, uint16_t(Value >> 16));
+ StringLE16(buf + 2, uint16_t(Value >> 16));
}
void StringLE64(char *buf, uint64_t Value) {
StringLE32(buf, uint32_t(Value >> 0));
- StringLE32(buf, uint32_t(Value >> 32));
+ StringLE32(buf + 4, uint32_t(Value >> 32));
}
void StringBE16(char *buf ,uint16_t Value) {
@@ -167,12 +167,12 @@
void StringBE32(char *buf, uint32_t Value) {
StringBE16(buf, uint16_t(Value >> 16));
- StringBE16(buf, uint16_t(Value >> 0));
+ StringBE16(buf + 2, uint16_t(Value >> 0));
}
void StringBE64(char *buf, uint64_t Value) {
StringBE32(buf, uint32_t(Value >> 32));
- StringBE32(buf, uint32_t(Value >> 0));
+ StringBE32(buf + 4, uint32_t(Value >> 0));
}
void String16(char *buf, uint16_t Value) {
More information about the llvm-commits
mailing list