Skip to content

Commit e7ec1db

Browse files
committed
Move SILGlobalVariable::dump out of line.
...so that it doesn't get emitted into every TU that imports the header.
1 parent ea5b362 commit e7ec1db

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

include/swift/SIL/SILGlobalVariable.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ class SILGlobalVariable
163163

164164
/// Pretty-print the variable.
165165
void dump(bool Verbose) const;
166-
void dump() const LLVM_ATTRIBUTE_USED { dump(false); }
166+
/// Pretty-print the variable.
167+
///
168+
/// This is a separate entry point for ease of debugging.
169+
void dump() const LLVM_ATTRIBUTE_USED;
167170

168171
/// Pretty-print the variable to the designated stream as a 'sil_global'
169172
/// definition.

lib/SIL/SILPrinter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,6 +2126,9 @@ void SILGlobalVariable::print(llvm::raw_ostream &OS, bool Verbose) const {
21262126
void SILGlobalVariable::dump(bool Verbose) const {
21272127
print(llvm::errs(), Verbose);
21282128
}
2129+
void SILGlobalVariable::dump() const {
2130+
dump(false);
2131+
}
21292132

21302133
void SILGlobalVariable::printName(raw_ostream &OS) const {
21312134
OS << "@" << Name;

0 commit comments

Comments
 (0)