[modules] Add optional out-param to ASTReader::ReadAST for imported submodules.
authorGraydon Hoare <ghoare@apple.com>
Fri, 9 Dec 2016 21:45:49 +0000 (21:45 +0000)
committerGraydon Hoare <ghoare@apple.com>
Fri, 9 Dec 2016 21:45:49 +0000 (21:45 +0000)
commite7196af07d2a0f74f3e49083ab309a48222e9c3f
tree7c9e9be6a523c0c664ce8f27e408ab06ab20f090
parent6c03cfb091c5550e6e4630946498c2271eaa471d
[modules] Add optional out-param to ASTReader::ReadAST for imported submodules.

Summary:
The Swift frontend is acquiring the ability to load non-module PCH files containing
bridging definitions from C/ObjC. As part of this work, it needs to know which submodules
were imported by a PCH in order to wrap them in local Swift modules. This information
is collected by ASTReader::ReadAST in a local vector, but is currently kept private.

The change here is just to make the type of the vector elements public, and provide
an optional out-parameter to the ReadAST method to provide the vector's contents to
a caller after a successful read.

Reviewers: manmanren, rsmith, doug.gregor

Subscribers: cfe-commits

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

llvm-svn: 289276
clang/include/clang/Serialization/ASTReader.h
clang/lib/Serialization/ASTReader.cpp