Phases.cpp 857 B

123456789101112131415161718192021222324252627
  1. //===--- Phases.cpp - Transformations on Driver Types ---------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include "clang/Driver/Phases.h"
  9. #include "llvm/Support/ErrorHandling.h"
  10. #include <cassert>
  11. using namespace clang::driver;
  12. const char *phases::getPhaseName(ID Id) {
  13. switch (Id) {
  14. case Preprocess: return "preprocessor";
  15. case Precompile: return "precompiler";
  16. case Compile: return "compiler";
  17. case Backend: return "backend";
  18. case Assemble: return "assembler";
  19. case Link: return "linker";
  20. case IfsMerge: return "ifsmerger";
  21. }
  22. llvm_unreachable("Invalid phase id.");
  23. }