Tweak the syntax of umbrella headers, so that "umbrella" is treated as

a modifier for a header declarartion, e.g.,

  umbrella header "headername"

Collapse the umbrella-handling code in the parser into the
header-handling code, so we don't duplicate the header-search logic.

llvm-svn: 146159
This commit is contained in:
Douglas Gregor
2011-12-08 18:00:48 +00:00
parent 73141fa98d
commit 322f633c1c
5 changed files with 49 additions and 109 deletions

View File

@@ -90,9 +90,14 @@ void Module::print(llvm::raw_ostream &OS, unsigned Indent) const {
if (const FileEntry *UmbrellaHeader = getUmbrellaHeader()) {
OS.indent(Indent + 2);
OS << "umbrella \"";
OS << "umbrella header \"";
OS.write_escaped(UmbrellaHeader->getName());
OS << "\"\n";
} else if (const DirectoryEntry *UmbrellaDir = getUmbrellaDir()) {
OS.indent(Indent + 2);
OS << "umbrella \"";
OS.write_escaped(UmbrellaDir->getName());
OS << "\"\n";
}
for (unsigned I = 0, N = Headers.size(); I != N; ++I) {