clang API Documentation

Phases.cpp
Go to the documentation of this file.
00001 //===--- Phases.cpp - Transformations on Driver Types ---------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #include "clang/Driver/Phases.h"
00011 #include "llvm/Support/ErrorHandling.h"
00012 #include <cassert>
00013 
00014 using namespace clang::driver;
00015 
00016 const char *phases::getPhaseName(ID Id) {
00017   switch (Id) {
00018   case Preprocess: return "preprocessor";
00019   case Precompile: return "precompiler";
00020   case Compile: return "compiler";
00021   case Assemble: return "assembler";
00022   case Link: return "linker";
00023   }
00024 
00025   llvm_unreachable("Invalid phase id.");
00026 }