Add SIL re-ingest test

This commit is contained in:
elsh
2021-10-14 19:03:31 -07:00
parent e1dfdba1e6
commit e3d5ae0172
3 changed files with 132 additions and 4 deletions

View File

@@ -176,6 +176,9 @@ public:
///
/// For a Swift module, this will only ever have one component, but an
/// imported Clang module might actually be a submodule.
///
/// *Note: see `StringRef operator*()` for details on the returned name for printing
/// for a Swift module.
class ReverseFullNameIterator {
public:
// Make this look like a valid STL iterator.
@@ -196,7 +199,7 @@ public:
/// Returns the name of the current module.
/// Note that for a Swift module, it returns the current module's real (binary) name,
/// which can be different from the name if module aliasing was used (see -module-alias).
/// which can be different from the name if module aliasing was used (see `-module-alias`).
StringRef operator*() const;
ReverseFullNameIterator &operator++();
@@ -211,6 +214,9 @@ public:
/// This is a convenience function that writes the entire name, in forward
/// order, to \p out.
///
/// It calls `StringRef operator*()` under the hood (see for more detail on the
/// returned name for a Swift module).
void printForward(raw_ostream &out, StringRef delim = ".") const;
};
@@ -796,6 +802,9 @@ public:
///
/// For a Swift module, this will only ever have one component, but an
/// imported Clang module might actually be a submodule.
///
/// *Note: see `StringRef operator*()` for details on the returned name for printing
/// for a Swift module.
ReverseFullNameIterator getReverseFullModuleName() const {
return ReverseFullNameIterator(this);
}