aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-03 18:55:56 +0000
committerChris Lattner <sabre@nondot.org>2006-05-03 18:55:56 +0000
commitd2d5c76753b132c34c71248db2f136b38531bc6d (patch)
tree80823ed7ec42a9b0254ce67366427af691361138
parent1e3822c7761933b588048b8128b12d495d312703 (diff)
downloadexternal_llvm-d2d5c76753b132c34c71248db2f136b38531bc6d.zip
external_llvm-d2d5c76753b132c34c71248db2f136b38531bc6d.tar.gz
external_llvm-d2d5c76753b132c34c71248db2f136b38531bc6d.tar.bz2
minor cleanups, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28087 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 4a6cd71..966b154 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -487,20 +487,20 @@ bool JITEmitter::finishFunction(MachineFunction &F) {
// If the target REALLY wants a stub for this function, emit it now.
if (!MR.doesntNeedFunctionStub())
ResultPtr = getJITResolver(this).getExternalFunctionStub(ResultPtr);
- } else if (MR.isGlobalValue())
+ } else if (MR.isGlobalValue()) {
ResultPtr = getPointerToGlobal(MR.getGlobalValue(),
BufferBegin+MR.getMachineCodeOffset(),
MR.doesntNeedFunctionStub());
- else //ConstantPoolIndex
- ResultPtr =
- (void*)(intptr_t)getConstantPoolEntryAddress(MR.getConstantPoolIndex());
+ } else {
+ assert(MR.isConstantPoolIndex());
+ ResultPtr=(void*)getConstantPoolEntryAddress(MR.getConstantPoolIndex());
+ }
MR.setResultPointer(ResultPtr);
// if we are managing the GOT and the relocation wants an index,
// give it one
- if (MemMgr.isManagingGOT() && !MR.isConstantPoolIndex() &&
- MR.isGOTRelative()) {
+ if (MemMgr.isManagingGOT() && MR.isGOTRelative()) {
unsigned idx = getJITResolver(this).getGOTIndexForAddr(ResultPtr);
MR.setGOTIndex(idx);
if (((void**)MemMgr.getGOTBase())[idx] != ResultPtr) {
@@ -516,7 +516,7 @@ bool JITEmitter::finishFunction(MachineFunction &F) {
Relocations.size(), MemMgr.getGOTBase());
}
- //Update the GOT entry for F to point to the new code.
+ // Update the GOT entry for F to point to the new code.
if(MemMgr.isManagingGOT()) {
unsigned idx = getJITResolver(this).getGOTIndexForAddr((void*)BufferBegin);
if (((void**)MemMgr.getGOTBase())[idx] != (void*)BufferBegin) {