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