Update clang to r339409b.

Change-Id: Ied8a188bb072c40035320acedc86164b66d920af
diff --git a/linux-x64/clang/include/llvm/DebugInfo/PDB/PDBSymbol.h b/linux-x64/clang/include/llvm/DebugInfo/PDB/PDBSymbol.h
index 0437346..3a74f7c 100644
--- a/linux-x64/clang/include/llvm/DebugInfo/PDB/PDBSymbol.h
+++ b/linux-x64/clang/include/llvm/DebugInfo/PDB/PDBSymbol.h
@@ -49,9 +49,22 @@
 class IPDBSession;
 
 #define DECLARE_PDB_SYMBOL_CONCRETE_TYPE(TagValue)                             \
+private:                                                                       \
+  using PDBSymbol::PDBSymbol;                                                  \
+  friend class PDBSymbol;                                                      \
+                                                                               \
+public:                                                                        \
   static const PDB_SymType Tag = TagValue;                                     \
   static bool classof(const PDBSymbol *S) { return S->getSymTag() == Tag; }
 
+#define DECLARE_PDB_SYMBOL_CUSTOM_TYPE(Condition)                              \
+private:                                                                       \
+  using PDBSymbol::PDBSymbol;                                                  \
+  friend class PDBSymbol;                                                      \
+                                                                               \
+public:                                                                        \
+  static bool classof(const PDBSymbol *S) { return Condition; }
+
 /// PDBSymbol defines the base of the inheritance hierarchy for concrete symbol
 /// types (e.g. functions, executables, vtables, etc).  All concrete symbol
 /// types inherit from PDBSymbol and expose the exact set of methods that are
@@ -59,14 +72,33 @@
 /// reference "Lexical and Class Hierarchy of Symbol Types":
 /// https://msdn.microsoft.com/en-us/library/370hs6k4.aspx
 class PDBSymbol {
+  static std::unique_ptr<PDBSymbol> createSymbol(const IPDBSession &PDBSession,
+                                                 PDB_SymType Tag);
+
 protected:
-  PDBSymbol(const IPDBSession &PDBSession,
-            std::unique_ptr<IPDBRawSymbol> Symbol);
-  PDBSymbol(PDBSymbol &Symbol);
+  explicit PDBSymbol(const IPDBSession &PDBSession);
+  PDBSymbol(PDBSymbol &&Other);
 
 public:
   static std::unique_ptr<PDBSymbol>
-  create(const IPDBSession &PDBSession, std::unique_ptr<IPDBRawSymbol> Symbol);
+  create(const IPDBSession &PDBSession,
+         std::unique_ptr<IPDBRawSymbol> RawSymbol);
+  static std::unique_ptr<PDBSymbol> create(const IPDBSession &PDBSession,
+                                           IPDBRawSymbol &RawSymbol);
+
+  template <typename ConcreteT>
+  static std::unique_ptr<ConcreteT>
+  createAs(const IPDBSession &PDBSession,
+           std::unique_ptr<IPDBRawSymbol> RawSymbol) {
+    std::unique_ptr<PDBSymbol> S = create(PDBSession, std::move(RawSymbol));
+    return unique_dyn_cast_or_null<ConcreteT>(std::move(S));
+  }
+  template <typename ConcreteT>
+  static std::unique_ptr<ConcreteT> createAs(const IPDBSession &PDBSession,
+                                             IPDBRawSymbol &RawSymbol) {
+    std::unique_ptr<PDBSymbol> S = create(PDBSession, RawSymbol);
+    return unique_dyn_cast_or_null<ConcreteT>(std::move(S));
+  }
 
   virtual ~PDBSymbol();
 
@@ -80,7 +112,8 @@
   /// normally goes on the right side of the symbol.
   virtual void dumpRight(PDBSymDumper &Dumper) const {}
 
-  void defaultDump(raw_ostream &OS, int Indent) const;
+  void defaultDump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowFlags,
+                   PdbSymbolIdField RecurseFlags) const;
   void dumpProperties() const;
   void dumpChildStats() const;
 
@@ -94,8 +127,6 @@
     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);
@@ -131,7 +162,8 @@
   }
 
   const IPDBSession &Session;
-  std::unique_ptr<IPDBRawSymbol> RawSymbol;
+  std::unique_ptr<IPDBRawSymbol> OwnedRawSymbol;
+  IPDBRawSymbol *RawSymbol = nullptr;
 };
 
 } // namespace llvm