From c43d55602fc99d8f048f1828f4a95dbadb2d6900 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 12 Sep 2018 22:57:03 +0000 Subject: [PATCH] [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 --- llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h | 5 ----- llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h | 1 - llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h | 1 - llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h | 1 - llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h | 1 - llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h | 2 -- llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h | 1 - llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h | 1 - llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h | 2 -- llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h | 2 -- llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h | 2 -- llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h | 2 -- llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h | 1 - llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h | 2 -- llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h | 5 ----- llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp | 8 -------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp | 7 ------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp | 7 ------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp | 7 ------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp | 7 ------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp | 7 ------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp | 7 ------- llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp | 7 ------- llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp | 4 ---- llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp | 4 ---- llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp | 4 ---- llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp | 4 ---- llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp | 4 ---- llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp | 4 ---- llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp | 4 ---- llvm/lib/DebugInfo/PDB/PDBSymbol.cpp | 4 ---- llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp | 4 ---- llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp | 5 ----- 39 files changed, 133 deletions(-) diff --git a/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h b/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h index 9713dce..ac7f196 100644 --- a/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h +++ b/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h @@ -43,11 +43,6 @@ public: void reset() override { Enumerator->reset(); } - ConcreteSymbolEnumerator *clone() const override { - std::unique_ptr WrappedClone(Enumerator->clone()); - return new ConcreteSymbolEnumerator(std::move(WrappedClone)); - } - private: std::unique_ptr Enumerator; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h index 930bea6..881d732 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h @@ -24,7 +24,6 @@ public: llvm::Optional getItemAtIndex(uint32_t Index) const override; bool getNext(RecordType &Record) override; void reset() override; - DIADataStream *clone() const override; private: CComPtr StreamData; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h index ffae664..1f12905 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h @@ -27,7 +27,6 @@ public: ChildTypePtr getChildAtIndex(uint32_t Index) const override; ChildTypePtr getNext() override; void reset() override; - DIAEnumDebugStreams *clone() const override; private: CComPtr Enumerator; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h index 39490a4..2fcefec 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h @@ -28,7 +28,6 @@ public: ChildTypePtr getChildAtIndex(uint32_t Index) const override; ChildTypePtr getNext() override; void reset() override; - DIAEnumInjectedSources *clone() const override; private: const DIASession &Session; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h index 08f0de1..f1cb626 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h @@ -26,7 +26,6 @@ public: ChildTypePtr getChildAtIndex(uint32_t Index) const override; ChildTypePtr getNext() override; void reset() override; - DIAEnumLineNumbers *clone() const override; private: CComPtr Enumerator; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h index 52c9563..ac2ae31 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h @@ -28,7 +28,6 @@ public: ChildTypePtr getChildAtIndex(uint32_t Index) const override; ChildTypePtr getNext() override; void reset() override; - DIAEnumSectionContribs *clone() const override; private: const DIASession &Session; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h index e69d18f..dac3df0 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h @@ -27,7 +27,6 @@ public: ChildTypePtr getChildAtIndex(uint32_t Index) const override; ChildTypePtr getNext() override; void reset() override; - DIAEnumSourceFiles *clone() const override; private: const DIASession &Session; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h index f779cd1..9689859 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h @@ -27,7 +27,6 @@ public: std::unique_ptr getChildAtIndex(uint32_t Index) const override; std::unique_ptr getNext() override; void reset() override; - DIAEnumSymbols *clone() const override; private: const DIASession &Session; diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h index 926fcfe..f4f856e 100644 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h @@ -26,7 +26,6 @@ public: std::unique_ptr getChildAtIndex(uint32_t Index) const override; std::unique_ptr getNext() override; void reset() override; - DIAEnumTables *clone() const override; private: CComPtr Enumerator; diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h b/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h index 67b5a06..0d7a286 100644 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h +++ b/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h @@ -32,7 +32,6 @@ public: virtual Optional getItemAtIndex(uint32_t Index) const = 0; virtual bool getNext(RecordType &Record) = 0; virtual void reset() = 0; - virtual IPDBDataStream *clone() const = 0; }; } // end namespace pdb diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h b/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h index b6b7d95..e846ffd6 100644 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h +++ b/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h @@ -27,7 +27,6 @@ public: virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0; virtual ChildTypePtr getNext() = 0; virtual void reset() = 0; - virtual MyType *clone() const = 0; }; } // end namespace pdb diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h index 9a5a35b..e1420fe 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h @@ -23,8 +23,6 @@ public: void dump(raw_ostream &OS, int Indent) const override; - std::unique_ptr clone() const override; - PDB_SymType getSymTag() const override; bool isEditAndContinueEnabled() const override; SymIndexId getLexicalParentId() const override; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h index e213bbe..c268641 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h @@ -25,7 +25,6 @@ public: std::unique_ptr getChildAtIndex(uint32_t Index) const override; std::unique_ptr getNext() override; void reset() override; - NativeEnumModules *clone() const override; private: NativeSession &Session; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h index e0a5c8d..8d1dcec 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h @@ -32,7 +32,6 @@ public: std::unique_ptr getChildAtIndex(uint32_t Index) const override; std::unique_ptr getNext() override; void reset() override; - NativeEnumTypes *clone() const override; private: NativeEnumTypes(NativeSession &Session, diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h index 81f0ac0..f4030da 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h @@ -25,8 +25,6 @@ class NativeExeSymbol : public NativeRawSymbol { public: NativeExeSymbol(NativeSession &Session, SymIndexId Id); - std::unique_ptr clone() const override; - std::unique_ptr findChildren(PDB_SymType Type) const override; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h index adb0418..647654b8 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h @@ -24,8 +24,6 @@ public: NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag, SymIndexId SymbolId); - virtual std::unique_ptr clone() const = 0; - void dump(raw_ostream &OS, int Indent) const override; std::unique_ptr diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h index cc44729..571bae8 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h @@ -25,8 +25,6 @@ public: uint64_t L); ~NativeTypeBuiltin() override; - virtual std::unique_ptr clone() const override; - void dump(raw_ostream &OS, int Indent) const override; PDB_SymType getSymTag() const override; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h index 878da8a..c42726e 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h @@ -27,8 +27,6 @@ public: void dump(raw_ostream &OS, int Indent) const override; - std::unique_ptr clone() const override; - std::unique_ptr findChildren(PDB_SymType Type) const override; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h index c743335..f504dff 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h @@ -27,7 +27,6 @@ public: ~NativeTypePointer() override; void dump(raw_ostream &OS, int Indent) const override; - std::unique_ptr clone() const override; bool isConstType() const override; uint64_t getLength() const override; diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h index 9861e81..7f063e2 100644 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h +++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h @@ -126,8 +126,6 @@ public: return Enumerator->getNext(); } - std::unique_ptr clone() const; - template std::unique_ptr> findAllChildren() const { auto BaseIter = RawSymbol->findChildren(T::Tag); diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h index acd97bc..937dd6c 100644 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h +++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h @@ -25,11 +25,6 @@ namespace pdb { class PDBSymbolTypeUDT : public PDBSymbol { DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UDT) public: - std::unique_ptr clone() const { - return getSession().getConcreteSymbolById( - getSymIndexId()); - } - void dump(PDBSymDumper &Dumper) const override; FORWARD_SYMBOL_ID_METHOD(getClassParent) diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp index 7eabed8..5c095ea 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 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 f62c499..d2451f1 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp @@ -45,10 +45,3 @@ std::unique_ptr DIAEnumDebugStreams::getNext() { } void DIAEnumDebugStreams::reset() { Enumerator->Reset(); } - -DIAEnumDebugStreams *DIAEnumDebugStreams::clone() const { - CComPtr 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 d7c908e..f90de34 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp @@ -43,10 +43,3 @@ std::unique_ptr DIAEnumInjectedSources::getNext() { } void DIAEnumInjectedSources::reset() { Enumerator->Reset(); } - -DIAEnumInjectedSources *DIAEnumInjectedSources::clone() const { - CComPtr 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 796ce21..0820d9d 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp @@ -42,10 +42,3 @@ std::unique_ptr DIAEnumLineNumbers::getNext() { } void DIAEnumLineNumbers::reset() { Enumerator->Reset(); } - -DIAEnumLineNumbers *DIAEnumLineNumbers::clone() const { - CComPtr 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 1f405f0..90c857a 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp @@ -45,10 +45,3 @@ std::unique_ptr DIAEnumSectionContribs::getNext() { } void DIAEnumSectionContribs::reset() { Enumerator->Reset(); } - -DIAEnumSectionContribs *DIAEnumSectionContribs::clone() const { - CComPtr 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 b9311d0..06595e7 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp @@ -42,10 +42,3 @@ std::unique_ptr DIAEnumSourceFiles::getNext() { } void DIAEnumSourceFiles::reset() { Enumerator->Reset(); } - -DIAEnumSourceFiles *DIAEnumSourceFiles::clone() const { - CComPtr 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 2666385..48bc327 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp @@ -46,10 +46,3 @@ std::unique_ptr DIAEnumSymbols::getNext() { } void DIAEnumSymbols::reset() { Enumerator->Reset(); } - -DIAEnumSymbols *DIAEnumSymbols::clone() const { - CComPtr 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 511b555..f0f0241 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp @@ -44,10 +44,3 @@ std::unique_ptr DIAEnumTables::getNext() { } void DIAEnumTables::reset() { Enumerator->Reset(); } - -DIAEnumTables *DIAEnumTables::clone() const { - CComPtr 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 b278526..64ddf75 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 NativeCompilandSymbol::clone() const { - return llvm::make_unique(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 9dd66f3..6e4d564 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp @@ -40,9 +40,5 @@ std::unique_ptr 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 2242106..c621e59 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp @@ -54,9 +54,5 @@ std::unique_ptr 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 1fbdc2b..97d20d4 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 NativeExeSymbol::clone() const { - return llvm::make_unique(Session, SymbolId); -} - std::unique_ptr 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 5a8400a..6031bba 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 NativeTypeBuiltin::clone() const { - return llvm::make_unique(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 ddb874b..6c1d4cc 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 NativeTypeEnum::clone() const { - return llvm::make_unique(Session, SymbolId, CV); -} - std::unique_ptr 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 0a648c7..3e5140c 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 NativeTypePointer::clone() const { - return llvm::make_unique(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 ca39a76..22ce972 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::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 c810e4e..75063cb 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> ArgListType; const IPDBSession &Session; diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp index c6148a3..c0564d3 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 Clone(Enumerator->clone()); - return new FunctionArgEnumerator(Session, std::move(Clone)); - } - private: const IPDBSession &Session; std::unique_ptr Enumerator; -- 2.7.4