Emit Swift declarations when printing SIL.

Only print function member declarations and skip the bodies since the bodies are already represented in SIL and ASTPrinter is not good enough to print arbitrary expressions.

In order to have valid output, make sure that ASTPrinter does not print references to DynamicLookup protocol.

Swift SVN r8627
This commit is contained in:
Anna Zaks
2013-09-25 17:08:42 +00:00
parent 4c61550b20
commit 30039a59f1
6 changed files with 89 additions and 4 deletions

View File

@@ -120,6 +120,13 @@ public:
/// Initialize the source location of the function.
void setLocation(SILLocation L) { Location = L; }
/// Check if the function has a location.
/// FIXME: All functions should have locations, so this method should not be
/// necessary.
bool hasLocation() const {
return Location.hasValue();
}
/// Get the source location of the function.
SILLocation getLocation() const {
assert(Location.hasValue());