diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-12-01 11:08:04 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-12-01 11:08:04 +0000 |
commit | 4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa (patch) | |
tree | 867cbbe32a66fd7d62dd9ce9df23a23fefdb8290 /include/clang/Frontend/CompilerInstance.h | |
parent | 6df2408694f81a03eb8b0e3b013272042233c061 (diff) | |
download | FreeBSD-src-4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa.zip FreeBSD-src-4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa.tar.gz |
Update clang to r90226.
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index ed28050..d7e7d99 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -21,6 +21,7 @@ namespace llvm { class LLVMContext; class raw_ostream; class raw_fd_ostream; +class Timer; } namespace clang { @@ -89,6 +90,9 @@ class CompilerInstance { /// The code completion consumer. llvm::OwningPtr<CodeCompleteConsumer> CompletionConsumer; + /// The frontend timer + llvm::OwningPtr<llvm::Timer> FrontendTimer; + /// The list of active output files. std::list< std::pair<std::string, llvm::raw_ostream*> > OutputFiles; @@ -367,6 +371,17 @@ public: void setCodeCompletionConsumer(CodeCompleteConsumer *Value); /// } + /// @name Frontend timer + /// { + + bool hasFrontendTimer() const { return FrontendTimer != 0; } + + llvm::Timer &getFrontendTimer() const { + assert(FrontendTimer && "Compiler instance has no frontend timer!"); + return *FrontendTimer; + } + + /// } /// @name Output Files /// { @@ -462,6 +477,9 @@ public: bool UseDebugPrinter, bool ShowMacros, llvm::raw_ostream &OS); + /// Create the frontend timer and replace any existing one with it. + void createFrontendTimer(); + /// Create the default output file (from the invocation's options) and add it /// to the list of tracked output files. llvm::raw_fd_ostream * |