diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-30 07:18:20 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-30 07:18:20 +0000 |
commit | fe994279ad2f0e11d325b74b1fb38401e59323fc (patch) | |
tree | f2e984261f7355093e0d7dece2b528df93fa2e6d | |
parent | 1c39f3c89d9120c8947a36e186201601934e3620 (diff) | |
download | bcm5719-llvm-fe994279ad2f0e11d325b74b1fb38401e59323fc.tar.gz bcm5719-llvm-fe994279ad2f0e11d325b74b1fb38401e59323fc.zip |
Simplify.
llvm-svn: 90115
-rw-r--r-- | clang/tools/clang-cc/clang-cc.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/tools/clang-cc/clang-cc.cpp b/clang/tools/clang-cc/clang-cc.cpp index 35912263072..ab3ede96587 100644 --- a/clang/tools/clang-cc/clang-cc.cpp +++ b/clang/tools/clang-cc/clang-cc.cpp @@ -142,8 +142,7 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { } static bool ConstructCompilerInvocation(CompilerInvocation &Opts, - Diagnostic &Diags, - const char *Argv0, bool &IsAST) { + Diagnostic &Diags, const char *Argv0) { // Initialize target options. InitializeTargetOptions(Opts.getTargetOpts()); @@ -164,8 +163,7 @@ static bool ConstructCompilerInvocation(CompilerInvocation &Opts, // // FIXME: These aren't used during operations on ASTs. Split onto a separate // code path to make this obvious. - IsAST = (IK == FrontendOptions::IK_AST); - if (!IsAST) + if (IK != FrontendOptions::IK_AST) InitializeLangOptions(Opts.getLangOpts(), IK); // Initialize the static analyzer options. @@ -296,10 +294,8 @@ int main(int argc, char **argv) { // // FIXME: We should move .ast inputs to taking a separate path, they are // really quite different. - bool IsAST = false; if (!ConstructCompilerInvocation(Clang.getInvocation(), - Clang.getDiagnostics(), - argv[0], IsAST)) + Clang.getDiagnostics(), argv[0])) return 1; // Create the target instance. @@ -328,6 +324,8 @@ int main(int argc, char **argv) { // If we aren't using an AST file, setup the file and source managers and // the preprocessor. + bool IsAST = + Clang.getFrontendOpts().Inputs[i].first == FrontendOptions::IK_AST; if (!IsAST) { if (!i) { // Create a file manager object to provide access to and cache the |