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