mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-17 14:36:07 +00:00
Remove redundant std::move on functions that return a unique_ptr.
llvm-svn: 238034
This commit is contained in:
parent
0215608bda
commit
ebcc0dcad1
@ -667,9 +667,9 @@ void TargetLayout<ELFT>::addExtraChunksToSegment(Segment<ELFT> *segment,
|
|||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
RelocationTable<ELFT> *TargetLayout<ELFT>::getDynamicRelocationTable() {
|
RelocationTable<ELFT> *TargetLayout<ELFT>::getDynamicRelocationTable() {
|
||||||
if (!_dynamicRelocationTable) {
|
if (!_dynamicRelocationTable) {
|
||||||
_dynamicRelocationTable = std::move(createRelocationTable(
|
_dynamicRelocationTable = createRelocationTable(
|
||||||
_ctx.isRelaOutputFormat() ? ".rela.dyn" : ".rel.dyn",
|
_ctx.isRelaOutputFormat() ? ".rela.dyn" : ".rel.dyn",
|
||||||
ORDER_DYNAMIC_RELOCS));
|
ORDER_DYNAMIC_RELOCS);
|
||||||
addSection(_dynamicRelocationTable.get());
|
addSection(_dynamicRelocationTable.get());
|
||||||
}
|
}
|
||||||
return _dynamicRelocationTable.get();
|
return _dynamicRelocationTable.get();
|
||||||
@ -678,9 +678,9 @@ RelocationTable<ELFT> *TargetLayout<ELFT>::getDynamicRelocationTable() {
|
|||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
RelocationTable<ELFT> *TargetLayout<ELFT>::getPLTRelocationTable() {
|
RelocationTable<ELFT> *TargetLayout<ELFT>::getPLTRelocationTable() {
|
||||||
if (!_pltRelocationTable) {
|
if (!_pltRelocationTable) {
|
||||||
_pltRelocationTable = std::move(createRelocationTable(
|
_pltRelocationTable = createRelocationTable(
|
||||||
_ctx.isRelaOutputFormat() ? ".rela.plt" : ".rel.plt",
|
_ctx.isRelaOutputFormat() ? ".rela.plt" : ".rel.plt",
|
||||||
ORDER_DYNAMIC_PLT_RELOCS));
|
ORDER_DYNAMIC_PLT_RELOCS);
|
||||||
addSection(_pltRelocationTable.get());
|
addSection(_pltRelocationTable.get());
|
||||||
}
|
}
|
||||||
return _pltRelocationTable.get();
|
return _pltRelocationTable.get();
|
||||||
|
@ -31,7 +31,7 @@ class LinkerScriptTest : public testing::Test {
|
|||||||
protected:
|
protected:
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
llvm::Triple triple(llvm::sys::getDefaultTargetTriple());
|
llvm::Triple triple(llvm::sys::getDefaultTargetTriple());
|
||||||
_ctx = std::move(GnuLdDriver::createELFLinkingContext(triple));
|
_ctx = GnuLdDriver::createELFLinkingContext(triple);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parse(StringRef script, bool nostdlib = false) {
|
void parse(StringRef script, bool nostdlib = false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user