From fdb8982f355961bd5864a01342cb26d724e229bf Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 3 Dec 2012 17:16:32 +0000 Subject: [PATCH] Add doc-comments to SIL Function and SILModule. re: r3322 Swift SVN r3330 --- include/swift/SIL/Function.h | 3 +++ include/swift/SIL/SILModule.h | 6 +++--- lib/SIL/SILPrinter.cpp | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/swift/SIL/Function.h b/include/swift/SIL/Function.h index cda63de613d..1c5487f7c63 100644 --- a/include/swift/SIL/Function.h +++ b/include/swift/SIL/Function.h @@ -31,6 +31,9 @@ namespace Lowering { class SILGenModule; } +/// Function - A function body that has been lowered to SIL. This consists of +/// zero or more SIL BasicBlock objects that contain the Instruction objects +/// making up the function. class Function : public SILAllocated { public: typedef llvm::iplist BlockListType; diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h index fa2e0eac200..25a1e63890c 100644 --- a/include/swift/SIL/SILModule.h +++ b/include/swift/SIL/SILModule.h @@ -30,10 +30,10 @@ namespace swift { class SILGenModule; } +/// SILModule - A SIL translation unit. The module object owns all of the SIL +/// Function and other top-level objects generated when a translation unit is +/// lowered to SIL. class SILModule : public SILBase { -public: - typedef llvm::iplist BlockListType; - private: friend class BasicBlock; friend class Function; diff --git a/lib/SIL/SILPrinter.cpp b/lib/SIL/SILPrinter.cpp index 4bbaa268b44..82b03d223d8 100644 --- a/lib/SIL/SILPrinter.cpp +++ b/lib/SIL/SILPrinter.cpp @@ -309,7 +309,7 @@ void BasicBlock::dump() const { print(llvm::errs()); } -/// Pretty-print the BasicBlock with the designated stream. +/// Pretty-print the BasicBlock to the designated stream. void BasicBlock::print(raw_ostream &OS) const { SILPrinter(OS).print(this); } @@ -319,7 +319,7 @@ void Function::dump() const { print(llvm::errs()); } -/// Pretty-print the Function with the designated stream. +/// Pretty-print the Function to the designated stream. void Function::print(llvm::raw_ostream &OS) const { SILPrinter Printer(OS); for (const BasicBlock &B : *this) @@ -331,7 +331,7 @@ void SILModule::dump() const { print(llvm::errs()); } -/// Pretty-print the Function with the designated stream. +/// Pretty-print the SILModule to the designated stream. void SILModule::print(llvm::raw_ostream &OS) const { for (ValueDecl *vd : functionDecls) { OS << "func_decl " << vd->getName() << '\n';