[llvm] r342093 - [PDB] Remove all clone() methods.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 12 15:57:03 PDT 2018


Author: zturner
Date: Wed Sep 12 15:57:03 2018
New Revision: 342093

URL: http://llvm.org/viewvc/llvm-project?rev=342093&view=rev
Log:
[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.

Modified:
    llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h
    llvm/trunk/include/llvm/DebugInfo/PDB/IPDBDataStream.h
    llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIADataStream.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h Wed Sep 12 15:57:03 2018
@@ -43,11 +43,6 @@ public:
 
   void reset() override { Enumerator->reset(); }
 
-  ConcreteSymbolEnumerator<ChildType> *clone() const override {
-    std::unique_ptr<IPDBEnumSymbols> WrappedClone(Enumerator->clone());
-    return new ConcreteSymbolEnumerator<ChildType>(std::move(WrappedClone));
-  }
-
 private:
 
   std::unique_ptr<IPDBEnumSymbols> Enumerator;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h Wed Sep 12 15:57:03 2018
@@ -24,7 +24,6 @@ public:
   llvm::Optional<RecordType> getItemAtIndex(uint32_t Index) const override;
   bool getNext(RecordType &Record) override;
   void reset() override;
-  DIADataStream *clone() const override;
 
 private:
   CComPtr<IDiaEnumDebugStreamData> StreamData;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h Wed Sep 12 15:57:03 2018
@@ -27,7 +27,6 @@ public:
   ChildTypePtr getChildAtIndex(uint32_t Index) const override;
   ChildTypePtr getNext() override;
   void reset() override;
-  DIAEnumDebugStreams *clone() const override;
 
 private:
   CComPtr<IDiaEnumDebugStreams> Enumerator;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h Wed Sep 12 15:57:03 2018
@@ -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;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h Wed Sep 12 15:57:03 2018
@@ -26,7 +26,6 @@ public:
   ChildTypePtr getChildAtIndex(uint32_t Index) const override;
   ChildTypePtr getNext() override;
   void reset() override;
-  DIAEnumLineNumbers *clone() const override;
 
 private:
   CComPtr<IDiaEnumLineNumbers> Enumerator;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h Wed Sep 12 15:57:03 2018
@@ -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;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h Wed Sep 12 15:57:03 2018
@@ -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;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h Wed Sep 12 15:57:03 2018
@@ -27,7 +27,6 @@ public:
   std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override;
   std::unique_ptr<PDBSymbol> getNext() override;
   void reset() override;
-  DIAEnumSymbols *clone() const override;
 
 private:
   const DIASession &Session;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIAEnumTables.h Wed Sep 12 15:57:03 2018
@@ -26,7 +26,6 @@ public:
   std::unique_ptr<IPDBTable> getChildAtIndex(uint32_t Index) const override;
   std::unique_ptr<IPDBTable> getNext() override;
   void reset() override;
-  DIAEnumTables *clone() const override;
 
 private:
   CComPtr<IDiaEnumTables> Enumerator;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/IPDBDataStream.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBDataStream.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/IPDBDataStream.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/IPDBDataStream.h Wed Sep 12 15:57:03 2018
@@ -32,7 +32,6 @@ public:
   virtual Optional<RecordType> getItemAtIndex(uint32_t Index) const = 0;
   virtual bool getNext(RecordType &Record) = 0;
   virtual void reset() = 0;
-  virtual IPDBDataStream *clone() const = 0;
 };
 
 } // end namespace pdb

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h Wed Sep 12 15:57:03 2018
@@ -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

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h Wed Sep 12 15:57:03 2018
@@ -23,8 +23,6 @@ public:
 
   void dump(raw_ostream &OS, int Indent) const override;
 
-  std::unique_ptr<NativeRawSymbol> clone() const override;
-
   PDB_SymType getSymTag() const override;
   bool isEditAndContinueEnabled() const override;
   SymIndexId getLexicalParentId() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h Wed Sep 12 15:57:03 2018
@@ -25,7 +25,6 @@ public:
   std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override;
   std::unique_ptr<PDBSymbol> getNext() override;
   void reset() override;
-  NativeEnumModules *clone() const override;
 
 private:
   NativeSession &Session;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeEnumTypes.h Wed Sep 12 15:57:03 2018
@@ -32,7 +32,6 @@ public:
   std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override;
   std::unique_ptr<PDBSymbol> getNext() override;
   void reset() override;
-  NativeEnumTypes *clone() const override;
 
 private:
   NativeEnumTypes(NativeSession &Session,

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h Wed Sep 12 15:57:03 2018
@@ -25,8 +25,6 @@ class NativeExeSymbol : public NativeRaw
 public:
   NativeExeSymbol(NativeSession &Session, SymIndexId Id);
 
-  std::unique_ptr<NativeRawSymbol> clone() const override;
-
   std::unique_ptr<IPDBEnumSymbols>
   findChildren(PDB_SymType Type) const override;
 

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h Wed Sep 12 15:57:03 2018
@@ -24,8 +24,6 @@ public:
   NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag,
                   SymIndexId SymbolId);
 
-  virtual std::unique_ptr<NativeRawSymbol> clone() const = 0;
-
   void dump(raw_ostream &OS, int Indent) const override;
 
   std::unique_ptr<IPDBEnumSymbols>

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h Wed Sep 12 15:57:03 2018
@@ -25,8 +25,6 @@ public:
                     uint64_t L);
   ~NativeTypeBuiltin() override;
 
-  virtual std::unique_ptr<NativeRawSymbol> clone() const override;
-
   void dump(raw_ostream &OS, int Indent) const override;
 
   PDB_SymType getSymTag() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h Wed Sep 12 15:57:03 2018
@@ -27,8 +27,6 @@ public:
 
   void dump(raw_ostream &OS, int Indent) const override;
 
-  std::unique_ptr<NativeRawSymbol> clone() const override;
-
   std::unique_ptr<IPDBEnumSymbols>
   findChildren(PDB_SymType Type) const override;
 

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h Wed Sep 12 15:57:03 2018
@@ -27,7 +27,6 @@ public:
   ~NativeTypePointer() override;
 
   void dump(raw_ostream &OS, int Indent) const override;
-  std::unique_ptr<NativeRawSymbol> clone() const override;
 
   bool isConstType() const override;
   uint64_t getLength() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h Wed Sep 12 15:57:03 2018
@@ -126,8 +126,6 @@ public:
     return Enumerator->getNext();
   }
 
-  std::unique_ptr<PDBSymbol> clone() const;
-
   template <typename T>
   std::unique_ptr<ConcreteSymbolEnumerator<T>> findAllChildren() const {
     auto BaseIter = RawSymbol->findChildren(T::Tag);

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h Wed Sep 12 15:57:03 2018
@@ -25,11 +25,6 @@ namespace pdb {
 class PDBSymbolTypeUDT : public PDBSymbol {
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UDT)
 public:
-  std::unique_ptr<PDBSymbolTypeUDT> clone() const {
-    return getSession().getConcreteSymbolById<PDBSymbolTypeUDT>(
-        getSymIndexId());
-  }
-
   void dump(PDBSymDumper &Dumper) const override;
 
   FORWARD_SYMBOL_ID_METHOD(getClassParent)

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIADataStream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIADataStream.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIADataStream.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIADataStream.cpp Wed Sep 12 15:57:03 2018
@@ -65,11 +65,3 @@ bool DIADataStream::getNext(RecordType &
 }
 
 void DIADataStream::reset() { StreamData->Reset(); }
-
-DIADataStream *DIADataStream::clone() const {
-  CComPtr<IDiaEnumDebugStreamData> EnumeratorClone;
-  if (S_OK != StreamData->Clone(&EnumeratorClone))
-    return nullptr;
-
-  return new DIADataStream(EnumeratorClone);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp Wed Sep 12 15:57:03 2018
@@ -45,10 +45,3 @@ std::unique_ptr<IPDBDataStream> DIAEnumD
 }
 
 void DIAEnumDebugStreams::reset() { Enumerator->Reset(); }
-
-DIAEnumDebugStreams *DIAEnumDebugStreams::clone() const {
-  CComPtr<IDiaEnumDebugStreams> EnumeratorClone;
-  if (S_OK != Enumerator->Clone(&EnumeratorClone))
-    return nullptr;
-  return new DIAEnumDebugStreams(EnumeratorClone);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp Wed Sep 12 15:57:03 2018
@@ -43,10 +43,3 @@ std::unique_ptr<IPDBInjectedSource> DIAE
 }
 
 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);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp Wed Sep 12 15:57:03 2018
@@ -42,10 +42,3 @@ std::unique_ptr<IPDBLineNumber> DIAEnumL
 }
 
 void DIAEnumLineNumbers::reset() { Enumerator->Reset(); }
-
-DIAEnumLineNumbers *DIAEnumLineNumbers::clone() const {
-  CComPtr<IDiaEnumLineNumbers> EnumeratorClone;
-  if (S_OK != Enumerator->Clone(&EnumeratorClone))
-    return nullptr;
-  return new DIAEnumLineNumbers(EnumeratorClone);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSectionContribs.cpp Wed Sep 12 15:57:03 2018
@@ -45,10 +45,3 @@ std::unique_ptr<IPDBSectionContrib> DIAE
 }
 
 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);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp Wed Sep 12 15:57:03 2018
@@ -42,10 +42,3 @@ std::unique_ptr<IPDBSourceFile> DIAEnumS
 }
 
 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);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp Wed Sep 12 15:57:03 2018
@@ -46,10 +46,3 @@ std::unique_ptr<PDBSymbol> DIAEnumSymbol
 }
 
 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);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp Wed Sep 12 15:57:03 2018
@@ -44,10 +44,3 @@ std::unique_ptr<IPDBTable> DIAEnumTables
 }
 
 void DIAEnumTables::reset() { Enumerator->Reset(); }
-
-DIAEnumTables *DIAEnumTables::clone() const {
-  CComPtr<IDiaEnumTables> EnumeratorClone;
-  if (S_OK != Enumerator->Clone(&EnumeratorClone))
-    return nullptr;
-  return new DIAEnumTables(EnumeratorClone);
-}

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp Wed Sep 12 15:57:03 2018
@@ -33,10 +33,6 @@ void NativeCompilandSymbol::dump(raw_ost
                   Indent);
 }
 
-std::unique_ptr<NativeRawSymbol> NativeCompilandSymbol::clone() const {
-  return llvm::make_unique<NativeCompilandSymbol>(Session, SymbolId, Module);
-}
-
 bool NativeCompilandSymbol::isEditAndContinueEnabled() const {
   return Module.hasECInfo();
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp Wed Sep 12 15:57:03 2018
@@ -40,9 +40,5 @@ std::unique_ptr<PDBSymbol> NativeEnumMod
 
 void NativeEnumModules::reset() { Index = 0; }
 
-NativeEnumModules *NativeEnumModules::clone() const {
-  return new NativeEnumModules(Session, Index);
-}
-
 }
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp Wed Sep 12 15:57:03 2018
@@ -54,9 +54,5 @@ std::unique_ptr<PDBSymbol> NativeEnumTyp
 
 void NativeEnumTypes::reset() { Index = 0; }
 
-NativeEnumTypes *NativeEnumTypes::clone() const {
-  return new NativeEnumTypes(Session, Matches, Kind);
-}
-
 } // namespace pdb
 } // namespace llvm

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp Wed Sep 12 15:57:03 2018
@@ -34,10 +34,6 @@ NativeExeSymbol::NativeExeSymbol(NativeS
     : 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) {

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp Wed Sep 12 15:57:03 2018
@@ -20,10 +20,6 @@ NativeTypeBuiltin::NativeTypeBuiltin(Nat
 
 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 {
 }
 

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp Wed Sep 12 15:57:03 2018
@@ -59,10 +59,6 @@ void NativeTypeEnum::dump(raw_ostream &O
   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) {

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp Wed Sep 12 15:57:03 2018
@@ -49,10 +49,6 @@ void NativeTypePointer::dump(raw_ostream
   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(); }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbol.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbol.cpp Wed Sep 12 15:57:03 2018
@@ -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(); }
 

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp Wed Sep 12 15:57:03 2018
@@ -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;

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp?rev=342093&r1=342092&r2=342093&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp Wed Sep 12 15:57:03 2018
@@ -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;




More information about the llvm-commits mailing list