From: Chris Lattner Date: Tue, 2 May 2006 17:16:20 +0000 (+0000) Subject: There is no reason to use a virtual method to store this word. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=608c189534eeb24c9c2cf4ba2958a18df895935a;p=oota-llvm.git There is no reason to use a virtual method to store this word. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28053 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index bac310cd6b5..75bc6ce1e33 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -89,11 +89,11 @@ bool Emitter::runOnMachineFunction(MachineFunction &MF) { MCE.emitJumpTableInfo(MF.getJumpTableInfo(), BasicBlockAddrs); MCE.finishFunction(MF); - // Resolve all forward branches now... + // Resolve all forward branches now. for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { unsigned Location = BasicBlockAddrs[BBRefs[i].first]; unsigned Ref = BBRefs[i].second; - MCE.emitWordAt(Location-Ref-4, (unsigned*)(intptr_t)Ref); + *((unsigned*)(intptr_t)Ref) = Location-Ref-4; } BBRefs.clear(); BasicBlockAddrs.clear();