mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user