aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/ASTUnit.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-25 22:30:56 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-25 22:30:56 +0000
commit467dc88512b4ba4bb16e274ea3771dc1415d31da (patch)
treec5ebc779742f310ab83aa597265cfd9a7e854b0b /include/clang/Frontend/ASTUnit.h
parentca4c40ab4995d195d9a4d175fa7c30dcc2d99ebf (diff)
Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch, except that Sema is somewhat more strict about the contents of -emit-module. In the future, there are likely to be more interesting differences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r--include/clang/Frontend/ASTUnit.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index db3f7ee01c..08b626facc 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -112,8 +112,8 @@ private:
/// \brief Track whether the main file was loaded from an AST or not.
bool MainFileIsAST;
- /// \brief Whether this AST represents a complete translation unit.
- bool CompleteTranslationUnit;
+ /// \brief What kind of translation unit this AST represents.
+ TranslationUnitKind TUKind;
/// \brief Whether we should time each operation.
bool WantTiming;
@@ -548,11 +548,8 @@ public:
llvm::MemoryBuffer *getBufferForFile(StringRef Filename,
std::string *ErrorStr = 0);
- /// \brief Whether this AST represents a complete translation unit.
- ///
- /// If false, this AST is only a partial translation unit, e.g., one
- /// that might still be used as a precompiled header or preamble.
- bool isCompleteTranslationUnit() const { return CompleteTranslationUnit; }
+ /// \brief Determine what kind of translation unit this AST represents.
+ TranslationUnitKind getTranslationUnitKind() const { return TUKind; }
typedef llvm::PointerUnion<const char *, const llvm::MemoryBuffer *>
FilenameOrMemBuf;
@@ -624,7 +621,7 @@ public:
bool OnlyLocalDecls = false,
bool CaptureDiagnostics = false,
bool PrecompilePreamble = false,
- bool CompleteTranslationUnit = true,
+ TranslationUnitKind TUKind = TU_Complete,
bool CacheCodeCompletionResults = false,
bool NestedMacroExpansions = true);
@@ -652,7 +649,7 @@ public:
unsigned NumRemappedFiles = 0,
bool RemappedFilesKeepOriginalName = true,
bool PrecompilePreamble = false,
- bool CompleteTranslationUnit = true,
+ TranslationUnitKind TUKind = TU_Complete,
bool CacheCodeCompletionResults = false,
bool CXXPrecompilePreamble = false,
bool CXXChainedPCH = false,