[llvm] r307835 - Fix non-Windows build after PDB native builtin type change
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 12:46:35 PDT 2017
Author: rnk
Date: Wed Jul 12 12:46:35 2017
New Revision: 307835
URL: http://llvm.org/viewvc/llvm-project?rev=307835&view=rev
Log:
Fix non-Windows build after PDB native builtin type change
Some C++14 features slipped in along with an extra member qualification.
Modified:
llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h
llvm/trunk/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp
llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h?rev=307835&r1=307834&r2=307835&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h Wed Jul 12 12:46:35 2017
@@ -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;
Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp?rev=307835&r1=307834&r2=307835&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeBuiltinSymbol.cpp Wed Jul 12 12:46:35 2017
@@ -23,7 +23,7 @@ NativeBuiltinSymbol::NativeBuiltinSymbol
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 {
Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp?rev=307835&r1=307834&r2=307835&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp Wed Jul 12 12:46:35 2017
@@ -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::findSymbolByTy
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;
}
More information about the llvm-commits
mailing list