[compiler-rt] r203743 - Preserve constness for intermediate pointers.
Joerg Sonnenberger
joerg at bec.de
Wed Mar 12 17:44:37 PDT 2014
Author: joerg
Date: Wed Mar 12 19:44:37 2014
New Revision: 203743
URL: http://llvm.org/viewvc/llvm-project?rev=203743&view=rev
Log:
Preserve constness for intermediate pointers.
Modified:
compiler-rt/trunk/lib/builtins/gcc_personality_v0.c
Modified: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/gcc_personality_v0.c?rev=203743&r1=203742&r2=203743&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/gcc_personality_v0.c (original)
+++ compiler-rt/trunk/lib/builtins/gcc_personality_v0.c Wed Mar 12 19:44:37 2014
@@ -107,34 +107,34 @@ static uintptr_t readEncodedPointer(cons
/* first get value */
switch (encoding & 0x0F) {
case DW_EH_PE_absptr:
- result = *((uintptr_t*)p);
+ result = *((const uintptr_t*)p);
p += sizeof(uintptr_t);
break;
case DW_EH_PE_uleb128:
result = readULEB128(&p);
break;
case DW_EH_PE_udata2:
- result = *((uint16_t*)p);
+ result = *((const uint16_t*)p);
p += sizeof(uint16_t);
break;
case DW_EH_PE_udata4:
- result = *((uint32_t*)p);
+ result = *((const uint32_t*)p);
p += sizeof(uint32_t);
break;
case DW_EH_PE_udata8:
- result = *((uint64_t*)p);
+ result = *((const uint64_t*)p);
p += sizeof(uint64_t);
break;
case DW_EH_PE_sdata2:
- result = *((int16_t*)p);
+ result = *((const int16_t*)p);
p += sizeof(int16_t);
break;
case DW_EH_PE_sdata4:
- result = *((int32_t*)p);
+ result = *((const int32_t*)p);
p += sizeof(int32_t);
break;
case DW_EH_PE_sdata8:
- result = *((int64_t*)p);
+ result = *((const int64_t*)p);
p += sizeof(int64_t);
break;
case DW_EH_PE_sleb128:
@@ -164,7 +164,7 @@ static uintptr_t readEncodedPointer(cons
/* then apply indirection */
if (encoding & DW_EH_PE_indirect) {
- result = *((uintptr_t*)result);
+ result = *((const uintptr_t*)result);
}
*data = p;
More information about the llvm-commits
mailing list