aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELFCodeEmitter.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-06-29 13:34:20 +0000
committerDuncan Sands <baldrick@free.fr>2010-06-29 13:34:20 +0000
commit17c6e6d9cf4c9e56a6a28e4d0ae3699d376a8962 (patch)
tree1cb41f221b5ee11ed153c61448aabe3445386da0 /lib/CodeGen/ELFCodeEmitter.cpp
parent6f74f69ff4a6e365272a754f0984c0321755976d (diff)
getMachineBasicBlockAddress returns a uintptr_t - don't truncate
to unsigned only to extend back to a pointer sized value on the next line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ELFCodeEmitter.cpp')
-rw-r--r--lib/CodeGen/ELFCodeEmitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/ELFCodeEmitter.cpp b/lib/CodeGen/ELFCodeEmitter.cpp
index 8416d3bda9..36b0e6514b 100644
--- a/lib/CodeGen/ELFCodeEmitter.cpp
+++ b/lib/CodeGen/ELFCodeEmitter.cpp
@@ -90,7 +90,7 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &MF) {
for (std::vector<MachineRelocation>::iterator MRI = JTRelocations.begin(),
MRE = JTRelocations.end(); MRI != MRE; ++MRI) {
MachineRelocation &MR = *MRI;
- unsigned MBBOffset = getMachineBasicBlockAddress(MR.getBasicBlock());
+ uintptr_t MBBOffset = getMachineBasicBlockAddress(MR.getBasicBlock());
MR.setResultPointer((void*)MBBOffset);
MR.setConstantVal(ES->SectionIdx);
JTSection.addRelocation(MR);