Phases.cpp 792 B

123456789101112131415161718192021222324252627
  1. //===--- Phases.cpp - Transformations on Driver Types ---------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #include "clang/Driver/Phases.h"
  10. #include "llvm/Support/ErrorHandling.h"
  11. #include <cassert>
  12. using namespace clang::driver;
  13. const char *phases::getPhaseName(ID Id) {
  14. switch (Id) {
  15. case Preprocess: return "preprocessor";
  16. case Precompile: return "precompiler";
  17. case Compile: return "compiler";
  18. case Backend: return "backend";
  19. case Assemble: return "assembler";
  20. case Link: return "linker";
  21. }
  22. llvm_unreachable("Invalid phase id.");
  23. }