diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-11 12:21:34 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-11 12:21:34 +0000 |
commit | 64ba50a972bfc26a5ed38080795cea3306db0e62 (patch) | |
tree | 91361029f1b01c7dcebaafd1184e9b5d9c7e4c34 /llvm/lib/Target/Mips/MipsISelLowering.cpp | |
parent | ba330aedceeb7e410e01c4504edece921c9b9850 (diff) | |
download | bcm5719-llvm-64ba50a972bfc26a5ed38080795cea3306db0e62.tar.gz bcm5719-llvm-64ba50a972bfc26a5ed38080795cea3306db0e62.zip |
Mips: Don't create a dangling IR function just to get the address of a symbol.
llvm-svn: 146340
Diffstat (limited to 'llvm/lib/Target/Mips/MipsISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index 4bd3d8afb84..4df84ee3cdf 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -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; |