diff --git a/llvm/lib/CodeGen/ELFCodeEmitter.cpp b/llvm/lib/CodeGen/ELFCodeEmitter.cpp index 8416d3bda930..36b0e6514b3a 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);