From 0b77319742c954e8a79bacf3f280242a06f59dbe Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 10 Dec 2008 02:32:19 +0000 Subject: Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin. llvm-svn: 60828 --- llvm/lib/Target/ARM/ARMCodeEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target/ARM/ARMCodeEmitter.cpp') diff --git a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp index 56fc55315f7..c27fc5f1eaf 100644 --- a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp @@ -1078,7 +1078,7 @@ void ARMCodeEmitter::emitBranchInstruction(const MachineInstr &MI) { void ARMCodeEmitter::emitInlineJumpTable(unsigned JTIndex) { // Remember the base address of the inline jump table. - intptr_t JTBase = MCE.getCurrentPCValue(); + uintptr_t JTBase = MCE.getCurrentPCValue(); JTI->addJumpTableBaseAddr(JTIndex, JTBase); DOUT << " ** Jump Table #" << JTIndex << " @ " << (void*)JTBase << '\n'; -- cgit v1.2.3