diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-04 01:24:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-04 01:24:40 +0000 |
commit | 2ab5e120d4e7ff02a9245a5051d055b7fdb8dda0 (patch) | |
tree | 5acad633b86f2847220922d2b68f871901e350bb | |
parent | d720da23dbe2f2b4f9293a2edecd8b74ebd4b188 (diff) | |
download | external_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.cpp | 2 |
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) |