diff options
author | Zachary Turner <zturner@google.com> | 2018-09-12 22:57:03 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-09-12 22:57:03 +0000 |
commit | c43d55602fc99d8f048f1828f4a95dbadb2d6900 (patch) | |
tree | 165d9efe229ac7308523d04eb3abd8c08b72145d /llvm/lib/DebugInfo/PDB | |
parent | aadfe4661d0ef95df53335e5fbeccad9e414a9a2 (diff) | |
download | bcm5719-llvm-c43d55602fc99d8f048f1828f4a95dbadb2d6900.tar.gz bcm5719-llvm-c43d55602fc99d8f048f1828f4a95dbadb2d6900.zip |
[PDB] Remove all clone() methods.
These are dead code and encourage poor usage patterns, so I'm
removing them. They weren't called anywhere anyway.
llvm-svn: 342093
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
18 files changed, 0 insertions, 98 deletions
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp index 7eabed8cad4..5c095eac53b 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp @@ -65,11 +65,3 @@ bool DIADataStream::getNext(RecordType &Record) { } void DIADataStream::reset() { StreamData->Reset(); } - -DIADataStream *DIADataStream::clone() const { - CComPtr<IDiaEnumDebugStreamData> EnumeratorClone; - if (S_OK != StreamData->Clone(&EnumeratorClone)) - return nullptr; - - return new DIADataStream(EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp index f62c4991fe3..d2451f13e6c 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp @@ -45,10 +45,3 @@ std::unique_ptr<IPDBDataStream> DIAEnumDebugStreams::getNext() { } void DIAEnumDebugStreams::reset() { Enumerator->Reset(); } - -DIAEnumDebugStreams *DIAEnumDebugStreams::clone() const { - CComPtr<IDiaEnumDebugStreams> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumDebugStreams(EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp index d7c908e0459..f90de3483ec 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp @@ -43,10 +43,3 @@ std::unique_ptr<IPDBInjectedSource> DIAEnumInjectedSources::getNext() { } void DIAEnumInjectedSources::reset() { Enumerator->Reset(); } - -DIAEnumInjectedSources *DIAEnumInjectedSources::clone() const { - CComPtr<IDiaEnumInjectedSources> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumInjectedSources(Session, EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp index 796ce214b38..0820d9dc7c9 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp @@ -42,10 +42,3 @@ std::unique_ptr<IPDBLineNumber> DIAEnumLineNumbers::getNext() { } void DIAEnumLineNumbers::reset() { Enumerator->Reset(); } - -DIAEnumLineNumbers *DIAEnumLineNumbers::clone() const { - CComPtr<IDiaEnumLineNumbers> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumLineNumbers(EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp index 1f405f04919..90c857aa571 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp @@ -45,10 +45,3 @@ std::unique_ptr<IPDBSectionContrib> DIAEnumSectionContribs::getNext() { } void DIAEnumSectionContribs::reset() { Enumerator->Reset(); } - -DIAEnumSectionContribs *DIAEnumSectionContribs::clone() const { - CComPtr<IDiaEnumSectionContribs> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumSectionContribs(Session, EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp index b9311d06012..06595e7ec1c 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp @@ -42,10 +42,3 @@ std::unique_ptr<IPDBSourceFile> DIAEnumSourceFiles::getNext() { } void DIAEnumSourceFiles::reset() { Enumerator->Reset(); } - -DIAEnumSourceFiles *DIAEnumSourceFiles::clone() const { - CComPtr<IDiaEnumSourceFiles> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumSourceFiles(Session, EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp index 266638530c2..48bc32767e6 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp @@ -46,10 +46,3 @@ std::unique_ptr<PDBSymbol> DIAEnumSymbols::getNext() { } void DIAEnumSymbols::reset() { Enumerator->Reset(); } - -DIAEnumSymbols *DIAEnumSymbols::clone() const { - CComPtr<IDiaEnumSymbols> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumSymbols(Session, EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp index 511b55585eb..f0f0241bf14 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp @@ -44,10 +44,3 @@ std::unique_ptr<IPDBTable> DIAEnumTables::getNext() { } void DIAEnumTables::reset() { Enumerator->Reset(); } - -DIAEnumTables *DIAEnumTables::clone() const { - CComPtr<IDiaEnumTables> EnumeratorClone; - if (S_OK != Enumerator->Clone(&EnumeratorClone)) - return nullptr; - return new DIAEnumTables(EnumeratorClone); -} diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp index b278526771f..64ddf75c6d2 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp @@ -33,10 +33,6 @@ void NativeCompilandSymbol::dump(raw_ostream &OS, int Indent) const { Indent); } -std::unique_ptr<NativeRawSymbol> NativeCompilandSymbol::clone() const { - return llvm::make_unique<NativeCompilandSymbol>(Session, SymbolId, Module); -} - bool NativeCompilandSymbol::isEditAndContinueEnabled() const { return Module.hasECInfo(); } diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp index 9dd66f3f0c4..6e4d56443a0 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp @@ -40,9 +40,5 @@ std::unique_ptr<PDBSymbol> NativeEnumModules::getNext() { void NativeEnumModules::reset() { Index = 0; } -NativeEnumModules *NativeEnumModules::clone() const { - return new NativeEnumModules(Session, Index); -} - } } diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp index 2242106067e..c621e591efb 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp @@ -54,9 +54,5 @@ std::unique_ptr<PDBSymbol> NativeEnumTypes::getNext() { void NativeEnumTypes::reset() { Index = 0; } -NativeEnumTypes *NativeEnumTypes::clone() const { - return new NativeEnumTypes(Session, Matches, Kind); -} - } // namespace pdb } // namespace llvm diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp index 1fbdc2b49ec..97d20d4d3bb 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp @@ -34,10 +34,6 @@ NativeExeSymbol::NativeExeSymbol(NativeSession &Session, SymIndexId SymbolId) : NativeRawSymbol(Session, PDB_SymType::Exe, SymbolId), Dbi(getDbiStreamPtr(Session)) {} -std::unique_ptr<NativeRawSymbol> NativeExeSymbol::clone() const { - return llvm::make_unique<NativeExeSymbol>(Session, SymbolId); -} - std::unique_ptr<IPDBEnumSymbols> NativeExeSymbol::findChildren(PDB_SymType Type) const { switch (Type) { diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp index 5a8400a5e4e..6031bba663a 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp @@ -20,10 +20,6 @@ NativeTypeBuiltin::NativeTypeBuiltin(NativeSession &PDBSession, SymIndexId Id, NativeTypeBuiltin::~NativeTypeBuiltin() {} -std::unique_ptr<NativeRawSymbol> NativeTypeBuiltin::clone() const { - return llvm::make_unique<NativeTypeBuiltin>(Session, SymbolId, Type, Length); -} - void NativeTypeBuiltin::dump(raw_ostream &OS, int Indent) const { } diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp index ddb874b0d14..6c1d4ccd09f 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp @@ -59,10 +59,6 @@ void NativeTypeEnum::dump(raw_ostream &OS, int Indent) const { dumpSymbolField(OS, "volatileType", isVolatileType(), Indent); } -std::unique_ptr<NativeRawSymbol> NativeTypeEnum::clone() const { - return llvm::make_unique<NativeTypeEnum>(Session, SymbolId, CV); -} - std::unique_ptr<IPDBEnumSymbols> NativeTypeEnum::findChildren(PDB_SymType Type) const { switch (Type) { diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp index 0a648c7219d..3e5140c4bd6 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp @@ -49,10 +49,6 @@ void NativeTypePointer::dump(raw_ostream &OS, int Indent) const { dumpSymbolField(OS, "volatileType", isVolatileType(), Indent); } -std::unique_ptr<NativeRawSymbol> NativeTypePointer::clone() const { - return llvm::make_unique<NativeTypePointer>(Session, SymbolId, Record); -} - bool NativeTypePointer::isConstType() const { return false; } uint64_t NativeTypePointer::getLength() const { return Record.getSize(); } diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp index ca39a76acc7..22ce9723baf 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp @@ -135,10 +135,6 @@ void PDBSymbol::dumpChildStats() const { outs().flush(); } -std::unique_ptr<PDBSymbol> PDBSymbol::clone() const { - return Session.getSymbolById(getSymIndexId()); -} - PDB_SymType PDBSymbol::getSymTag() const { return RawSymbol->getSymTag(); } uint32_t PDBSymbol::getSymIndexId() const { return RawSymbol->getSymIndexId(); } diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp index c810e4ec349..75063cb3e7f 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp @@ -69,10 +69,6 @@ public: void reset() override { CurIter = Args.empty() ? Args.end() : Args.begin(); } - FunctionArgEnumerator *clone() const override { - return new FunctionArgEnumerator(Session, Func); - } - private: typedef std::vector<std::unique_ptr<PDBSymbolData>> ArgListType; const IPDBSession &Session; diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp index c6148a3880a..c0564d3941d 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp @@ -56,11 +56,6 @@ public: void reset() override { Enumerator->reset(); } - MyType *clone() const override { - std::unique_ptr<ArgEnumeratorType> Clone(Enumerator->clone()); - return new FunctionArgEnumerator(Session, std::move(Clone)); - } - private: const IPDBSession &Session; std::unique_ptr<ArgEnumeratorType> Enumerator; |