From: Chris Lattner Date: Wed, 4 Jun 2003 01:24:40 +0000 (+0000) Subject: Avoid generating a getelementptr instruction of a function X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2ab5e120d4e7ff02a9245a5051d055b7fdb8dda0;p=oota-llvm.git 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 --- diff --git a/lib/Target/SparcV9/SparcV9PreSelection.cpp b/lib/Target/SparcV9/SparcV9PreSelection.cpp index bd85d3a4bc0..a4e6d7a4312 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(ptr)) ptr = cast(ptr)->getValue(); - return (isa(ptr)) + return (isa(ptr)) ? new GetElementPtrInst(ptr, std::vector(1, ConstantSInt::get(Type::LongTy, 0U)), "addrOfGlobal", &insertBefore)