forked from OSchip/llvm-project
Fix non-Windows build after PDB native builtin type change
Some C++14 features slipped in along with an extra member qualification. llvm-svn: 307835
This commit is contained in:
parent
8d090fc531
commit
0962cb2e3a
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
void dump(raw_ostream &OS, int Indent) const override;
|
||||
|
||||
PDB_SymType NativeBuiltinSymbol::getSymTag() const override;
|
||||
PDB_SymType getSymTag() const override;
|
||||
|
||||
PDB_BuiltinType getBuiltinType() const override;
|
||||
bool isConstType() const override;
|
||||
|
|
|
@ -23,7 +23,7 @@ NativeBuiltinSymbol::NativeBuiltinSymbol(NativeSession &PDBSession,
|
|||
NativeBuiltinSymbol::~NativeBuiltinSymbol() {}
|
||||
|
||||
std::unique_ptr<NativeRawSymbol> NativeBuiltinSymbol::clone() const {
|
||||
return std::make_unique<NativeBuiltinSymbol>(Session, SymbolId, Type, Length);
|
||||
return llvm::make_unique<NativeBuiltinSymbol>(Session, SymbolId, Type, Length);
|
||||
}
|
||||
|
||||
void NativeBuiltinSymbol::dump(raw_ostream &OS, int Indent) const {
|
||||
|
|
|
@ -38,7 +38,7 @@ using namespace llvm::pdb;
|
|||
namespace {
|
||||
// Maps codeview::SimpleTypeKind of a built-in type to the parameters necessary
|
||||
// to instantiate a NativeBuiltinSymbol for that type.
|
||||
static const struct {
|
||||
static const struct BuiltinTypeEntry {
|
||||
codeview::SimpleTypeKind Kind;
|
||||
PDB_BuiltinType Type;
|
||||
uint32_t Size;
|
||||
|
@ -115,14 +115,16 @@ SymIndexId NativeSession::findSymbolByTypeIndex(codeview::TypeIndex Index) {
|
|||
if (Index.getSimpleMode() != codeview::SimpleTypeMode::Direct)
|
||||
return 0;
|
||||
const auto Kind = Index.getSimpleKind();
|
||||
const auto It = std::find_if(
|
||||
std::begin(BuiltinTypes), std::end(BuiltinTypes),
|
||||
[Kind](const auto &Builtin) { return Builtin.Kind == Kind; });
|
||||
const auto It =
|
||||
std::find_if(std::begin(BuiltinTypes), std::end(BuiltinTypes),
|
||||
[Kind](const BuiltinTypeEntry &Builtin) {
|
||||
return Builtin.Kind == Kind;
|
||||
});
|
||||
if (It == std::end(BuiltinTypes))
|
||||
return 0;
|
||||
SymIndexId Id = SymbolCache.size();
|
||||
SymbolCache.emplace_back(
|
||||
std::make_unique<NativeBuiltinSymbol>(*this, Id, It->Type, It->Size));
|
||||
llvm::make_unique<NativeBuiltinSymbol>(*this, Id, It->Type, It->Size));
|
||||
TypeIndexToSymbolId[Index] = Id;
|
||||
return Id;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue