[llvm-commits] [llvm] r107139 - /llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp
Duncan Sands
baldrick at free.fr
Tue Jun 29 06:34:21 PDT 2010
Author: baldrick
Date: Tue Jun 29 08:34:20 2010
New Revision: 107139
URL: http://llvm.org/viewvc/llvm-project?rev=107139&view=rev
Log:
getMachineBasicBlockAddress returns a uintptr_t - don't truncate
to unsigned only to extend back to a pointer sized value on the
next line.
Modified:
llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp
Modified: llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp?rev=107139&r1=107138&r2=107139&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp (original)
+++ llvm/trunk/lib/CodeGen/ELFCodeEmitter.cpp Tue Jun 29 08:34:20 2010
@@ -90,7 +90,7 @@
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);
More information about the llvm-commits
mailing list