Add getDeserializationListener to ASTReader
authorYuka Takahashi <yukatkh@gmail.com>
Thu, 26 Apr 2018 15:09:13 +0000 (15:09 +0000)
committerYuka Takahashi <yukatkh@gmail.com>
Thu, 26 Apr 2018 15:09:13 +0000 (15:09 +0000)
Summary:
We need to know if ASTReader already has a DeserializationListner or
not, and this also helps to create a multiplexing deserialization
listener if there is one already attached.

Reviewers: v.g.vassilev, rsmith, dblaikie, thakis

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D45921

llvm-svn: 330946

clang/include/clang/Serialization/ASTReader.h

index 01cd055..ba9fc06 100644 (file)
@@ -1599,6 +1599,11 @@ public:
   void setDeserializationListener(ASTDeserializationListener *Listener,
                                   bool TakeOwnership = false);
 
+  /// \brief Get the AST deserialization listener.
+  ASTDeserializationListener *getDeserializationListener() {
+    return DeserializationListener;
+  }
+
   /// \brief Determine whether this AST reader has a global index.
   bool hasGlobalIndex() const { return (bool)GlobalIndex; }