Avoid generating a getelementptr instruction of a function
authorChris Lattner <sabre@nondot.org>
Wed, 4 Jun 2003 01:24:40 +0000 (01:24 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 4 Jun 2003 01:24:40 +0000 (01:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6591 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9PreSelection.cpp

index bd85d3a4bc0d1a4450b2f2c8a871b62089a520f0..a4e6d7a43124d58300f165532efb45fdd4ae3f20 100644 (file)
@@ -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)