| OLD | NEW |
| 1 //===--- Driver.cpp - Clang GCC Compatible Driver -------------------------===// | 1 //===--- Driver.cpp - Clang GCC Compatible Driver -------------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 | 9 |
| 10 #include "clang/Driver/Driver.h" | 10 #include "clang/Driver/Driver.h" |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 if (Args.hasArg(options::OPT_module_file_info)) | 1357 if (Args.hasArg(options::OPT_module_file_info)) |
| 1358 return llvm::make_unique<CompileJobAction>(std::move(Input), | 1358 return llvm::make_unique<CompileJobAction>(std::move(Input), |
| 1359 types::TY_ModuleFile); | 1359 types::TY_ModuleFile); |
| 1360 if (Args.hasArg(options::OPT_verify_pch)) | 1360 if (Args.hasArg(options::OPT_verify_pch)) |
| 1361 return llvm::make_unique<VerifyPCHJobAction>(std::move(Input), | 1361 return llvm::make_unique<VerifyPCHJobAction>(std::move(Input), |
| 1362 types::TY_Nothing); | 1362 types::TY_Nothing); |
| 1363 return llvm::make_unique<CompileJobAction>(std::move(Input), | 1363 return llvm::make_unique<CompileJobAction>(std::move(Input), |
| 1364 types::TY_LLVM_BC); | 1364 types::TY_LLVM_BC); |
| 1365 } | 1365 } |
| 1366 case phases::Backend: { | 1366 case phases::Backend: { |
| 1367 if (IsUsingLTO(TC, Args)) { | 1367 if (IsUsingLTO(TC, Args) || TC.isBitcodeOnlyTarget()) { |
| 1368 types::ID Output = | 1368 types::ID Output = |
| 1369 Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC; | 1369 Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC; |
| 1370 return llvm::make_unique<BackendJobAction>(std::move(Input), Output); | 1370 return llvm::make_unique<BackendJobAction>(std::move(Input), Output); |
| 1371 } | 1371 } |
| 1372 if (Args.hasArg(options::OPT_emit_llvm) || TC.isBitcodeOnlyTarget()) { | 1372 if (Args.hasArg(options::OPT_emit_llvm)) { |
| 1373 types::ID Output = | 1373 types::ID Output = |
| 1374 Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR : types::TY_LLVM_BC; | 1374 Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR : types::TY_LLVM_BC; |
| 1375 return llvm::make_unique<BackendJobAction>(std::move(Input), Output); | 1375 return llvm::make_unique<BackendJobAction>(std::move(Input), Output); |
| 1376 } | 1376 } |
| 1377 return llvm::make_unique<BackendJobAction>(std::move(Input), | 1377 return llvm::make_unique<BackendJobAction>(std::move(Input), |
| 1378 types::TY_PP_Asm); | 1378 types::TY_PP_Asm); |
| 1379 } | 1379 } |
| 1380 case phases::Assemble: | 1380 case phases::Assemble: |
| 1381 return llvm::make_unique<AssembleJobAction>(std::move(Input), | 1381 return llvm::make_unique<AssembleJobAction>(std::move(Input), |
| 1382 types::TY_Object); | 1382 types::TY_Object); |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2197 } else { | 2197 } else { |
| 2198 ExcludedFlagsBitmask |= options::CLOption; | 2198 ExcludedFlagsBitmask |= options::CLOption; |
| 2199 } | 2199 } |
| 2200 | 2200 |
| 2201 return std::make_pair(IncludedFlagsBitmask, ExcludedFlagsBitmask); | 2201 return std::make_pair(IncludedFlagsBitmask, ExcludedFlagsBitmask); |
| 2202 } | 2202 } |
| 2203 | 2203 |
| 2204 bool clang::driver::isOptimizationLevelFast(const llvm::opt::ArgList &Args) { | 2204 bool clang::driver::isOptimizationLevelFast(const llvm::opt::ArgList &Args) { |
| 2205 return Args.hasFlag(options::OPT_Ofast, options::OPT_O_Group, false); | 2205 return Args.hasFlag(options::OPT_Ofast, options::OPT_O_Group, false); |
| 2206 } | 2206 } |
| OLD | NEW |