Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
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/IPDBRawSymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H

#include "PDBTypes.h"
#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eFiles/LLVMDebugInfoPDB.dir/PDBSymbolTypeUDT.cpp.o -c /Users/kykrueger/repos/llvm-project/llvm/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp
In file included from /Users/kykrueger/repos/llvm-project/llvm/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp:9:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/APFloat.h:19:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/Hashing.h:53:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:79:19: error: invalid application of 'sizeof' to an incomplete type 'llvm::pdb::IPDBLineNumber'
   79 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:293:7: note: in instantiation of member function 'std::default_delete<llvm::pdb::IPDBLineNumber>::operator()' requested he
re
  293 |       __ptr_.second()(__tmp);
      |       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:71: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::IPDBLineNumber>::reset' requested here
  262 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h:39:25: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::IPDBLineNumber>::~unique_ptr' requested here
   39 |   FORWARD_SYMBOL_METHOD(getSrcLineOnTypeDefn) 
      |                         ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:30:7: note: forward declaration of 'llvm::pdb::IPDBLineNumber'
   30 | class IPDBLineNumber;
      |       ^
1 error generated.

Similar to the includes added for the other macros, this import provides a completed class declaration required for a unique_ptr which is generated by FORWARD_SYMBOL_METHOD(getSrcLineOnTypeDefn)

#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAILED: [code=1] lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/PDBSymbol.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/kykrueger/repos/llvm-project/build/lib/DebugInfo/PDB -I/Users/kykrueger/repos/llvm-project/llvm/lib/DebugInfo/PDB -I/Users/kykrueger/repos/llvm-project/build/include -I/Users/kykrueger/repos/llvm-project/llvm/include -isystem /opt/homebrew/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -O3 -DNDEBUG -std=c++2b -arch arm64  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/PDBSymbol.cpp.o -MF lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/PDBSymbol.cpp.o.d -o lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/PDBSymbol.cpp.o -c /Users/kykrueger/repos/llvm-project/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp
In file included from /Users/kykrueger/repos/llvm-project/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp:9:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/APFloat.h:19:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/Hashing.h:53:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:79:19: error: invalid application of 'sizeof' to an incomplete type 'llvm::pdb::PDBSymbolTypeFunctionSig'
   79 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:293:7: note: in instantiation of member function 'std::default_delete<llvm::pdb::PDBSymbolTypeFunctionSig>::operator()' requested here
  293 |       __ptr_.second()(__tmp);
      |       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:71: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::PDBSymbolTypeFunctionSig>::reset' requested here
  262 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h:73:3: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::PDBSymbolTypeFunctionSig>::~unique_ptr' requested here
   73 |   FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(PDBSymbolTypeFunctionSig, getType,
      |   ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h:28:12: note: expanded from macro 'FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME'
   28 |     return getConcreteSymbolByIdHelper<ConcreteType>(Id);                      \
      |            ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:49:7: note: forward declaration of 'llvm::pdb::PDBSymbolTypeFunctionSig'
   49 | class PDBSymbolTypeFunctionSig;
      |       ^
1 error generated.

The code generated by the macro at line 73:

  FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(PDBSymbolTypeFunctionSig, getType,
                                              getSignature)

Results in a unique_ptr to PDBSymbolTypeFunctionSig which is now a constexpr in c++23.
This constexpr requires that PDBSymbolTypeFunctionSig is a complete type, which was not the case with the forward declaration.

Instead of importing the header here, it should also be possible to move the definition of the methods defined by the macro to the PDBSymbolFunc.cpp file where the complete type is known. Since there are so many methods defined with these macros in PDB, I didn't want to break the paradigm by moving the methods and only declaring them here in the header.

#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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h:12:                                                                                                      
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h:12:                                                                                                              
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h:12:                                                                                                          
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:12:                                                                                                               
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/APFloat.h:19:                                                                                                                          
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:12:                                                                                                                         
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/Hashing.h:53:                                                                                                                          
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1846:                                                                                                           
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28:                                                                                           
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:79:19: error: invalid application of 'sizeof' to an incomplete type 'llvm::pdb::IPDBLineNumber'                           
   79 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");                                                                                                                                       
      |                   ^~~~~~~~~~~                                                                                                                                                                                  
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:293:7: note: in instantiation of member function 'std::default_delete<llvm::pdb::IPDBLineNumber>::operator()' requested he
re                                                                                                                                                                                                                     
  293 |       __ptr_.second()(__tmp);                                                                                                                                                                                  
      |       ^                                                                                                                                                                                                        
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:71: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::IPDBLineNumber>::reset' requested here      
  262 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }                                                                                                                               
      |                                                                       ^                                                                                                                                        
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h:41:25: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::IPDBLineNumber>::~unique_ptr' requested here      
   41 |   FORWARD_SYMBOL_METHOD(getSrcLineOnTypeDefn)                                                                                                                                                                  
      |                         ^                                                                                                                                                                                      
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:30:7: note: forward declaration of 'llvm::pdb::IPDBLineNumber'                                                                          
   30 | class IPDBLineNumber;  

This include solves the above error when compiling against the c++23 standard.

Similar to the case of #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h", I didn't want to break the paradigm of declaring all of the methods with the macros in this header file. It may be possible to fix this by removing the use of this macro FORWARD_SYMBOL_METHOD(getSrcLineOnTypeDefn), and instead only declaring the method while defining it in a place where the full definition of IPDBLineNumber is known.

#include "llvm/Support/Compiler.h"

#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In file included from /Users/kykrueger/repos/llvm-project/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp:9:                                                                                                              
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h:12:                                                                                                      
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h:12:                                                                                                              
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/APFloat.h:19:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:12:
In file included from /Users/kykrueger/repos/llvm-project/llvm/include/llvm/ADT/Hashing.h:53:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1846:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/inplace_merge.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:79:19: error: invalid application of 'sizeof' to an incomplete type 'llvm::pdb::PDBSymbolTypeBuiltin'
   79 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:293:7: note: in instantiation of member function 'std::default_delete<llvm::pdb::PDBSymbolTypeBuiltin>::operator()' reques
ted here
  293 |       __ptr_.second()(__tmp);
      |       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:71: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::PDBSymbolTypeBuiltin>::reset' requested here
  262 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h:46:3: note: in instantiation of member function 'std::unique_ptr<llvm::pdb::PDBSymbolTypeBuiltin>::~unique_ptr' requested here
   46 |   FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(PDBSymbolTypeBuiltin, getType,
      |   ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h:28:12: note: expanded from macro 'FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME'
   28 |     return getConcreteSymbolByIdHelper<ConcreteType>(Id);                      \
      |            ^
/Users/kykrueger/repos/llvm-project/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h:52:7: note: forward declaration of 'llvm::pdb::PDBSymbolTypeBuiltin'
   52 | class PDBSymbolTypeBuiltin;

Similar to the case of #include "llvm/DebugInfo/PDB/IPDBLineNumber.h" above, this include also provides a complete type which is required in the expanded version of a below macro:

  FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(PDBSymbolTypeBuiltin, getType,
                                              getUnderlyingType)


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
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
7 changes: 7 additions & 0 deletions llvm/lib/MC/MCGOFFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ 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)) {}

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
7 changes: 7 additions & 0 deletions llvm/lib/TableGen/TGParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ 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