X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=unittests%2FDebugInfo%2FPDB%2FPDBApiTest.cpp;h=ebd3d7bb6b3ca649a9d51401a6aa81b2ed36d13d;hb=00552e3875ee5f382db6c98286a241a7d0efe1b8;hp=fd65d10dfed75fb1eae1fc2e5539149a2d1e6e12;hpb=1e708541480f90958ee18273a540e70edda2e3d3;p=oota-llvm.git diff --git a/unittests/DebugInfo/PDB/PDBApiTest.cpp b/unittests/DebugInfo/PDB/PDBApiTest.cpp index fd65d10dfed..ebd3d7bb6b3 100644 --- a/unittests/DebugInfo/PDB/PDBApiTest.cpp +++ b/unittests/DebugInfo/PDB/PDBApiTest.cpp @@ -9,6 +9,7 @@ #include +#include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" #include "llvm/DebugInfo/PDB/IPDBSession.h" @@ -71,6 +72,16 @@ class MockSession : public IPDBSession { getSourceFileById(uint32_t SymbolId) const override { return nullptr; } + + std::unique_ptr + findSymbolByAddress(uint64_t Address, PDB_SymType Type) const override { + return nullptr; + } + std::unique_ptr + findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override { + return nullptr; + } + std::unique_ptr getAllSourceFiles() const override { return nullptr; } @@ -78,14 +89,18 @@ class MockSession : public IPDBSession { const PDBSymbolCompiland &Compiland) const override { return nullptr; } + + std::unique_ptr getDebugStreams() const override { + return nullptr; + } }; class MockRawSymbol : public IPDBRawSymbol { public: - MockRawSymbol(const IPDBSession &PDBSession, PDB_SymType SymType) - : Session(PDBSession), Type(SymType) {} + MockRawSymbol(PDB_SymType SymType) + : Type(SymType) {} - void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override {} + void dump(raw_ostream &OS, int Indent) const override {} std::unique_ptr findChildren(PDB_SymType Type) const override { @@ -267,9 +282,11 @@ public: MOCK_SYMBOL_ACCESSOR(isVirtualBaseClass) MOCK_SYMBOL_ACCESSOR(isVirtualInheritance) MOCK_SYMBOL_ACCESSOR(isVolatileType) + MOCK_SYMBOL_ACCESSOR(getValue) + MOCK_SYMBOL_ACCESSOR(wasInlined) + MOCK_SYMBOL_ACCESSOR(getUnused) private: - const IPDBSession &Session; PDB_SymType Type; }; @@ -334,7 +351,7 @@ private: std::unique_ptr Session; void InsertItemWithTag(PDB_SymType Tag) { - auto RawSymbol = std::make_unique(*Session, Tag); + auto RawSymbol = llvm::make_unique(Tag); auto Symbol = PDBSymbol::create(*Session, std::move(RawSymbol)); SymbolMap.insert(std::make_pair(Tag, std::move(Symbol))); }