1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Mips: Don't create a dangling IR function just to get the address of a symbol.

llvm-svn: 146340
This commit is contained in:
Benjamin Kramer 2011-12-11 12:21:34 +00:00
parent e13f84af78
commit 263c777e81

View File

@ -1553,12 +1553,7 @@ LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
unsigned PtrSize = PtrVT.getSizeInBits();
IntegerType *PtrTy = Type::getIntNTy(*DAG.getContext(), PtrSize);
SmallVector<Type*, 1> Params;
Params.push_back(PtrTy);
FunctionType *FuncTy = FunctionType::get(PtrTy, Params, false);
Function *Func = Function::Create(FuncTy, GlobalValue::ExternalLinkage,
"__tls_get_addr");
SDValue TlsGetAddr = DAG.getGlobalAddress(Func, dl, PtrVT);
SDValue TlsGetAddr = DAG.getExternalSymbol("__tls_get_addr", PtrVT);
ArgListTy Args;
ArgListEntry Entry;