forked from OSchip/llvm-project
Apply clang-tidy's misc-move-constructor-init to lld.
No functionality change intended. llvm-svn: 271686
This commit is contained in:
parent
e78e4a6e94
commit
bd521201b7
|
@ -18,6 +18,7 @@
|
|||
#include "llvm/ADT/iterator_range.h"
|
||||
#include "llvm/Object/COFF.h"
|
||||
#include <atomic>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace lld {
|
||||
|
@ -294,7 +295,7 @@ private:
|
|||
// functions. x86-only.
|
||||
class SEHTableChunk : public Chunk {
|
||||
public:
|
||||
explicit SEHTableChunk(std::set<Defined *> S) : Syms(S) {}
|
||||
explicit SEHTableChunk(std::set<Defined *> S) : Syms(std::move(S)) {}
|
||||
size_t getSize() const override { return Syms.size() * 4; }
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "lld/Core/LLVM.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace lld {
|
||||
|
@ -21,7 +22,7 @@ class ScriptParserBase {
|
|||
public:
|
||||
explicit ScriptParserBase(StringRef S) : Input(S), Tokens(tokenize(S)) {}
|
||||
explicit ScriptParserBase(std::vector<StringRef> Tokens)
|
||||
: Input(""), Tokens(Tokens) {}
|
||||
: Input(""), Tokens(std::move(Tokens)) {}
|
||||
|
||||
protected:
|
||||
void setError(const Twine &Msg);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "llvm/Support/Debug.h"
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
|
||||
using namespace lld;
|
||||
|
||||
|
@ -260,7 +261,7 @@ static bool compareAtoms(const LayoutPass::SortKey &lc,
|
|||
}
|
||||
|
||||
LayoutPass::LayoutPass(const Registry ®istry, SortOverride sorter)
|
||||
: _registry(registry), _customSorter(sorter) {}
|
||||
: _registry(registry), _customSorter(std::move(sorter)) {}
|
||||
|
||||
// Returns the atom immediately followed by the given atom in the followon
|
||||
// chain.
|
||||
|
|
Loading…
Reference in New Issue