From: Chris Lattner Date: Fri, 26 Nov 2004 20:25:17 +0000 (+0000) Subject: There is no reason to store , just store . X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=15ee8adb00535834ad7962939868b4a9583577ca;p=oota-llvm.git There is no reason to store , just store . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18263 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp index a41385bc0a4..7c150bfb2d7 100644 --- a/lib/Target/PowerPC/PPCJITInfo.cpp +++ b/lib/Target/PowerPC/PPCJITInfo.cpp @@ -16,7 +16,7 @@ #include "PPC32Relocations.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/Config/alloca.h" -#include +#include using namespace llvm; static TargetJITInfo::JITCompilerFn JITCompilerFunction; @@ -210,10 +210,8 @@ void PPC32JITInfo::relocate(void *Function, MachineRelocation *MR, // the pointer is relocated into instructions instead of the pointer // itself. Because we have to keep the mapping anyway, we just return // pointers to the values in the map as our new location. - static std::map Pointers; - void *&Ptr = Pointers[(void*)ResultPtr]; - Ptr = (void*)ResultPtr; - ResultPtr = (intptr_t)&Ptr; + static std::set Pointers; + ResultPtr = (intptr_t)&*Pointers.insert((void*)ResultPtr).first; } // FALL THROUGH case PPC::reloc_absolute_high: // high bits of ref -> low 16 of instr