aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-04 01:24:40 +0000
committerChris Lattner <sabre@nondot.org>2003-06-04 01:24:40 +0000
commit2ab5e120d4e7ff02a9245a5051d055b7fdb8dda0 (patch)
tree5acad633b86f2847220922d2b68f871901e350bb
parentd720da23dbe2f2b4f9293a2edecd8b74ebd4b188 (diff)
downloadexternal_llvm-2ab5e120d4e7ff02a9245a5051d055b7fdb8dda0.zip
external_llvm-2ab5e120d4e7ff02a9245a5051d055b7fdb8dda0.tar.gz
external_llvm-2ab5e120d4e7ff02a9245a5051d055b7fdb8dda0.tar.bz2
Avoid generating a getelementptr instruction of a function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6591 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9PreSelection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/SparcV9PreSelection.cpp b/lib/Target/SparcV9/SparcV9PreSelection.cpp
index bd85d3a..a4e6d7a 100644
--- a/lib/Target/SparcV9/SparcV9PreSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9PreSelection.cpp
@@ -177,7 +177,7 @@ static GetElementPtrInst* getGlobalAddr(Value* ptr, Instruction& insertBefore)
if (isa<ConstantPointerRef>(ptr))
ptr = cast<ConstantPointerRef>(ptr)->getValue();
- return (isa<GlobalValue>(ptr))
+ return (isa<GlobalVariable>(ptr))
? new GetElementPtrInst(ptr,
std::vector<Value*>(1, ConstantSInt::get(Type::LongTy, 0U)),
"addrOfGlobal", &insertBefore)