From d34bb4e9b0467152bb39eb59cbcb668341b02b0d Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 29 Jun 2010 13:34:20 +0000 Subject: getMachineBasicBlockAddress returns a uintptr_t - don't truncate to unsigned only to extend back to a pointer sized value on the next line. llvm-svn: 107139 --- llvm/lib/CodeGen/ELFCodeEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/ELFCodeEmitter.cpp') diff --git a/llvm/lib/CodeGen/ELFCodeEmitter.cpp b/llvm/lib/CodeGen/ELFCodeEmitter.cpp index 8416d3bda93..36b0e6514b3 100644 --- a/llvm/lib/CodeGen/ELFCodeEmitter.cpp +++ b/llvm/lib/CodeGen/ELFCodeEmitter.cpp @@ -90,7 +90,7 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &MF) { for (std::vector::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); -- cgit v1.2.3