Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MachineFunctionAnalysis
std::unique_ptr<MachineFunction> MF;

public:
Result(std::unique_ptr<MachineFunction> MF) : MF(std::move(MF)) {}
Result(std::unique_ptr<MachineFunction> MF);
MachineFunction &getMF() { return *MF; };
LLVM_ABI bool invalidate(Function &, const PreservedAnalyses &PA,
FunctionAnalysisManager::Invalidator &);
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/CodeGen/ResourcePriorityQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ namespace llvm {

public:
ResourcePriorityQueue(SelectionDAGISel *IS);
~ResourcePriorityQueue();

bool isBottomUp() const override { return false; }

Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/DebugInfo/GSYM/GsymContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class GsymReader;
class GsymContext : public DIContext {
public:
GsymContext(std::unique_ptr<GsymReader> Reader);
~GsymContext();

GsymContext(GsymContext &) = delete;
GsymContext &operator=(GsymContext &) = delete;
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LLVM_DEBUGINFO_PDB_CONCRETESYMBOLENUMERATOR_H

#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
#include "llvm/DebugInfo/PDB/PDBSymbol.h"
#include "llvm/DebugInfo/PDB/PDBTypes.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
#include "llvm/Support/Compiler.h"
#include <memory>

Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/DebugInfo/PDB/Native/InputFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class InputFile {
getOrCreateTypeCollection(TypeCollectionKind Kind);

public:
InputFile(PDBFile *Pdb) { PdbOrObj = Pdb; }
InputFile(object::COFFObjectFile *Obj) { PdbOrObj = Obj; }
InputFile(MemoryBuffer *Buffer) { PdbOrObj = Buffer; }
InputFile(PDBFile *Pdb);
InputFile(object::COFFObjectFile *Obj);
InputFile(MemoryBuffer *Buffer);
LLVM_ABI ~InputFile();
InputFile(InputFile &&Other) = default;

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H

#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
#include "llvm/Support/Compiler.h"

#include "PDBSymbol.h"
Expand All @@ -21,7 +22,6 @@ namespace pdb {

class PDBSymDumper;
class PDBSymbolData;
class PDBSymbolTypeFunctionSig;
template <typename ChildType> class IPDBEnumChildren;

class LLVM_ABI PDBSymbolFunc : public PDBSymbol {
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace pdb {
class LLVM_ABI PDBSymbolTypeBuiltin : public PDBSymbol {
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BuiltinType)
public:
~PDBSymbolTypeBuiltin();
void dump(PDBSymDumper &Dumper) const override;

FORWARD_SYMBOL_METHOD(getBuiltinType)
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@

#include "PDBSymbol.h"
#include "PDBTypes.h"
#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
#include "llvm/Support/Compiler.h"

#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"

namespace llvm {

Expand Down
4 changes: 1 addition & 3 deletions llvm/include/llvm/MC/MCGOFFStreamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ class MCGOFFStreamer : public MCObjectStreamer {
public:
MCGOFFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
std::unique_ptr<MCObjectWriter> OW,
std::unique_ptr<MCCodeEmitter> Emitter)
: MCObjectStreamer(Context, std::move(MAB), std::move(OW),
std::move(Emitter)) {}
std::unique_ptr<MCCodeEmitter> Emitter);

~MCGOFFStreamer() override;

Expand Down
12 changes: 6 additions & 6 deletions llvm/lib/CodeGen/LiveDebugVariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,6 @@ class UserLabel {

namespace llvm {

/// Implementation of the LiveDebugVariables pass.

LiveDebugVariables::LiveDebugVariables() = default;
LiveDebugVariables::~LiveDebugVariables() = default;
LiveDebugVariables::LiveDebugVariables(LiveDebugVariables &&) = default;

class LiveDebugVariables::LDVImpl {
LocMap::Allocator allocator;
MachineFunction *MF = nullptr;
Expand Down Expand Up @@ -683,6 +677,12 @@ class LiveDebugVariables::LDVImpl {
void print(raw_ostream&);
};

/// Implementation of the LiveDebugVariables pass.

LiveDebugVariables::LiveDebugVariables() = default;
LiveDebugVariables::~LiveDebugVariables() = default;
LiveDebugVariables::LiveDebugVariables(LiveDebugVariables &&) = default;

} // namespace llvm

static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS,
Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/CodeGen/MachineFunctionAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ using namespace llvm;

AnalysisKey MachineFunctionAnalysis::Key;

llvm::MachineFunctionAnalysis::Result::Result(
std::unique_ptr<MachineFunction> MF)
: MF(std::move(MF)) {}

bool MachineFunctionAnalysis::Result::invalidate(
Function &, const PreservedAnalyses &PA,
FunctionAnalysisManager::Invalidator &) {
Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ ResourcePriorityQueue::ResourcePriorityQueue(SelectionDAGISel *IS)
HorizontalVerticalBalance = 0;
}

ResourcePriorityQueue::~ResourcePriorityQueue() = default;

unsigned
ResourcePriorityQueue::numberRCValPredInSU(SUnit *SU, unsigned RCId) {
unsigned NumberDeps = 0;
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/DebugInfo/GSYM/GsymContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using namespace llvm;
using namespace llvm::gsym;

GsymContext::~GsymContext() = default;
GsymContext::GsymContext(std::unique_ptr<GsymReader> Reader)
: DIContext(CK_GSYM), Reader(std::move(Reader)) {}

Expand Down
5 changes: 5 additions & 0 deletions llvm/lib/DebugInfo/PDB/Native/InputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,3 +586,8 @@ bool llvm::pdb::shouldDumpSymbolGroup(uint32_t Idx, const SymbolGroup &Group,
// Otherwise, only dump if this is the same module specified.
return (Filters.DumpModi == Idx);
}
llvm::pdb::InputFile::InputFile(PDBFile *Pdb) { PdbOrObj = Pdb; }

llvm::pdb::InputFile::InputFile(object::COFFObjectFile *Obj) { PdbOrObj = Obj; }

llvm::pdb::InputFile::InputFile(MemoryBuffer *Buffer) { PdbOrObj = Buffer; }
6 changes: 6 additions & 0 deletions llvm/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

#include "llvm/DebugInfo/PDB/PDBSymDumper.h"

namespace llvm {
namespace pdb {
PDBSymbolTypeBuiltin::~PDBSymbolTypeBuiltin() = default;
} // namespace pdb
} // namespace llvm

using namespace llvm;
using namespace llvm::pdb;

Expand Down
6 changes: 6 additions & 0 deletions llvm/lib/MC/MCGOFFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ MCStreamer *llvm::createGOFFStreamer(MCContext &Context,
new MCGOFFStreamer(Context, std::move(MAB), std::move(OW), std::move(CE));
return S;
}
llvm::MCGOFFStreamer::MCGOFFStreamer(MCContext &Context,
std::unique_ptr<MCAsmBackend> MAB,
std::unique_ptr<MCObjectWriter> OW,
std::unique_ptr<MCCodeEmitter> Emitter)
: MCObjectStreamer(Context, std::move(MAB), std::move(OW),
std::move(Emitter)) {}
3 changes: 3 additions & 0 deletions llvm/lib/ObjCopy/ELF/ELFObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,9 @@ Error BasicELFBuilder::initSections() {
return Error::success();
}

BasicELFBuilder::BasicELFBuilder() : Obj(std::make_unique<Object>()) {}
BasicELFBuilder::~BasicELFBuilder() = default;

void BinaryELFBuilder::addData(SymbolTableSection *SymTab) {
auto Data = ArrayRef<uint8_t>(
reinterpret_cast<const uint8_t *>(MemBuf->getBufferStart()),
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/ObjCopy/ELF/ELFObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,8 @@ class BasicELFBuilder {
Error initSections();

public:
BasicELFBuilder() : Obj(std::make_unique<Object>()) {}
BasicELFBuilder();
~BasicELFBuilder();
};

class BinaryELFBuilder : public BasicELFBuilder {
Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Remarks/BitstreamRemarkParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,3 +600,5 @@ BitstreamRemarkParser::processRemark(BitstreamRemarkParserHelper &Helper) {

return std::move(Result);
}
llvm::remarks::BitstreamRemarkParser::BitstreamRemarkParser(StringRef Buf)
: RemarkParser(Format::Bitstream), ParserHelper(Buf) {}
3 changes: 1 addition & 2 deletions llvm/lib/Remarks/BitstreamRemarkParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ struct BitstreamRemarkParser : public RemarkParser {

/// Create a parser that expects to find a string table embedded in the
/// stream.
explicit BitstreamRemarkParser(StringRef Buf)
: RemarkParser(Format::Bitstream), ParserHelper(Buf) {}
explicit BitstreamRemarkParser(StringRef Buf);

Expected<std::unique_ptr<Remark>> next() override;

Expand Down
8 changes: 8 additions & 0 deletions llvm/lib/TableGen/TGParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ using namespace llvm;

namespace llvm {

RecordsEntry::RecordsEntry(std::unique_ptr<Record> Rec) : Rec(std::move(Rec)) {}
RecordsEntry::RecordsEntry(std::unique_ptr<ForeachLoop> Loop)
: Loop(std::move(Loop)) {}
RecordsEntry::RecordsEntry(std::unique_ptr<Record::AssertionInfo> Assertion)
: Assertion(std::move(Assertion)) {}
RecordsEntry::RecordsEntry(std::unique_ptr<Record::DumpInfo> Dump)
: Dump(std::move(Dump)) {}

struct SubClassReference {
SMRange RefRange;
const Record *Rec = nullptr;
Expand Down
10 changes: 4 additions & 6 deletions llvm/lib/TableGen/TGParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ struct RecordsEntry {
void dump() const;

RecordsEntry() = default;
RecordsEntry(std::unique_ptr<Record> Rec) : Rec(std::move(Rec)) {}
RecordsEntry(std::unique_ptr<ForeachLoop> Loop) : Loop(std::move(Loop)) {}
RecordsEntry(std::unique_ptr<Record::AssertionInfo> Assertion)
: Assertion(std::move(Assertion)) {}
RecordsEntry(std::unique_ptr<Record::DumpInfo> Dump)
: Dump(std::move(Dump)) {}
RecordsEntry(std::unique_ptr<Record> Rec);
RecordsEntry(std::unique_ptr<ForeachLoop> Loop);
RecordsEntry(std::unique_ptr<Record::AssertionInfo> Assertion);
RecordsEntry(std::unique_ptr<Record::DumpInfo> Dump);
};

/// ForeachLoop - Record the iteration state associated with a for loop.
Expand Down
6 changes: 6 additions & 0 deletions llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ RISCVTargetELFStreamer::RISCVTargetELFStreamer(MCStreamer &S,
setFlagsFromFeatures(STI);
}

RISCVELFStreamer::RISCVELFStreamer(MCContext &C,
std::unique_ptr<MCAsmBackend> MAB,
std::unique_ptr<MCObjectWriter> MOW,
std::unique_ptr<MCCodeEmitter> MCE)
: MCELFStreamer(C, std::move(MAB), std::move(MOW), std::move(MCE)) {}

RISCVELFStreamer &RISCVTargetELFStreamer::getStreamer() {
return static_cast<RISCVELFStreamer &>(Streamer);
}
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class RISCVELFStreamer : public MCELFStreamer {
public:
RISCVELFStreamer(MCContext &C, std::unique_ptr<MCAsmBackend> MAB,
std::unique_ptr<MCObjectWriter> MOW,
std::unique_ptr<MCCodeEmitter> MCE)
: MCELFStreamer(C, std::move(MAB), std::move(MOW), std::move(MCE)) {}
std::unique_ptr<MCCodeEmitter> MCE);

void changeSection(MCSection *Section, uint32_t Subsection) override;
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override;
Expand Down
5 changes: 5 additions & 0 deletions llvm/tools/dsymutil/DebugMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ struct YAMLContext {

} // end anonymous namespace

DebugMap::DebugMap(const Triple &BinaryTriple, StringRef BinaryPath,
ArrayRef<uint8_t> BinaryUUID)
: BinaryTriple(BinaryTriple), BinaryPath(std::string(BinaryPath)),
BinaryUUID(BinaryUUID.begin(), BinaryUUID.end()) {}

ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
DebugMap::parseYAMLDebugMap(BinaryHolder &BinHolder, StringRef InputFile,
StringRef PrependPath, bool Verbose) {
Expand Down
4 changes: 1 addition & 3 deletions llvm/tools/dsymutil/DebugMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ class DebugMap {

public:
DebugMap(const Triple &BinaryTriple, StringRef BinaryPath,
ArrayRef<uint8_t> BinaryUUID = ArrayRef<uint8_t>())
: BinaryTriple(BinaryTriple), BinaryPath(std::string(BinaryPath)),
BinaryUUID(BinaryUUID.begin(), BinaryUUID.end()) {}
ArrayRef<uint8_t> BinaryUUID = ArrayRef<uint8_t>());

using const_iterator = ObjectContainer::const_iterator;

Expand Down
17 changes: 17 additions & 0 deletions llvm/tools/llvm-cov/SourceCoverageView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@

using namespace llvm;

ExpansionView::ExpansionView(const CounterMappingRegion &Region,
std::unique_ptr<SourceCoverageView> View)
: Region(Region), View(std::move(View)) {}

ExpansionView::ExpansionView(ExpansionView &&RHS)
: Region(std::move(RHS.Region)), View(std::move(RHS.View)) {}

ExpansionView &ExpansionView::operator=(ExpansionView &&RHS) {
Region = std::move(RHS.Region);
View = std::move(RHS.View);
return *this;
}

InstantiationView::InstantiationView(StringRef FunctionName, unsigned Line,
std::unique_ptr<SourceCoverageView> View)
: FunctionName(FunctionName), Line(Line), View(std::move(View)) {}

void CoveragePrinter::StreamDestructor::operator()(raw_ostream *OS) const {
if (OS == &outs())
return;
Expand Down
15 changes: 4 additions & 11 deletions llvm/tools/llvm-cov/SourceCoverageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,9 @@ struct ExpansionView {
std::unique_ptr<SourceCoverageView> View;

ExpansionView(const CounterMappingRegion &Region,
std::unique_ptr<SourceCoverageView> View)
: Region(Region), View(std::move(View)) {}
ExpansionView(ExpansionView &&RHS)
: Region(std::move(RHS.Region)), View(std::move(RHS.View)) {}
ExpansionView &operator=(ExpansionView &&RHS) {
Region = std::move(RHS.Region);
View = std::move(RHS.View);
return *this;
}
std::unique_ptr<SourceCoverageView> View);
ExpansionView(ExpansionView &&RHS);
ExpansionView &operator=(ExpansionView &&RHS);

unsigned getLine() const { return Region.LineStart; }
unsigned getStartCol() const { return Region.ColumnStart; }
Expand All @@ -58,8 +52,7 @@ struct InstantiationView {
std::unique_ptr<SourceCoverageView> View;

InstantiationView(StringRef FunctionName, unsigned Line,
std::unique_ptr<SourceCoverageView> View)
: FunctionName(FunctionName), Line(Line), View(std::move(View)) {}
std::unique_ptr<SourceCoverageView> View);

friend bool operator<(const InstantiationView &LHS,
const InstantiationView &RHS) {
Expand Down
13 changes: 13 additions & 0 deletions llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ bool GroupMatcher::candidateConditionMatches(
return Predicate.isIdentical(RepresentativeCondition);
}

std::unique_ptr<PredicateMatcher> GroupMatcher::popFirstCondition() {
assert(!Conditions.empty() &&
"Trying to pop a condition from a condition-less group");
std::unique_ptr<PredicateMatcher> P = std::move(Conditions.front());
Conditions.erase(Conditions.begin());
return P;
}

bool GroupMatcher::addMatcher(Matcher &Candidate) {
if (!Candidate.hasFirstCondition())
return false;
Expand Down Expand Up @@ -690,6 +698,9 @@ void SwitchMatcher::emit(MatchTable &Table) {

//===- RuleMatcher --------------------------------------------------------===//

RuleMatcher::RuleMatcher(ArrayRef<SMLoc> SrcLoc)
: SrcLoc(SrcLoc), RuleID(NextRuleID++) {}

uint64_t RuleMatcher::NextRuleID = 0;

StringRef RuleMatcher::getOpcode() const {
Expand Down Expand Up @@ -1096,6 +1107,8 @@ unsigned RuleMatcher::countRendererFns() const {
});
}

void RuleMatcher::insnmatchers_pop_front() { Matchers.erase(Matchers.begin()); }

//===- PredicateMatcher ---------------------------------------------------===//

PredicateMatcher::~PredicateMatcher() {}
Expand Down
Loading
Loading