diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-07 23:23:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-07 23:23:06 +0000 |
commit | d3598a65716e120aef45aa2841d730e03f7101fe (patch) | |
tree | ce9a13a0ffb45453f15471a62d3797ae4383170b /lib | |
parent | c34ce3fa613d5e4a283e53615fceafd17390445b (diff) |
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 48a698368d..2b4eecd2b2 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -359,7 +359,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocation(CompilerInvocation *CI, Act.reset(new TopLevelDeclTrackerAction(*AST)); if (!Act->BeginSourceFile(Clang, Clang.getFrontendOpts().Inputs[0].second, - /*IsAST=*/false)) + Clang.getFrontendOpts().Inputs[0].first)) goto error; Act->Execute(); diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 4f6ed56410..0af355c431 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -509,7 +509,7 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { createPreprocessor(); } - if (Act.BeginSourceFile(*this, InFile, IsAST)) { + if (Act.BeginSourceFile(*this, InFile, getFrontendOpts().Inputs[i].first)) { Act.Execute(); Act.EndSourceFile(); } diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 87fc1227b2..66bec7c4ae 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -32,7 +32,7 @@ void FrontendAction::setCurrentFile(llvm::StringRef Value, ASTUnit *AST) { bool FrontendAction::BeginSourceFile(CompilerInstance &CI, llvm::StringRef Filename, - bool IsAST) { + InputKind InputKind) { assert(!Instance && "Already processing a source file!"); assert(!Filename.empty() && "Unexpected empty filename!"); setCurrentFile(Filename); @@ -40,6 +40,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, // AST files follow a very different path, since they share objects via the // AST unit. + bool IsAST = InputKind == IK_AST; if (IsAST) { assert(!usesPreprocessorOnly() && "Attempt to pass AST file to preprocessor only action!"); |