blob: b885eeef98324ebe833cb7cfb1156102b8d65da5 [file] [log] [blame]
Nick Lewycky3fdcc6f2010-12-31 17:31:54 +00001//===--- Phases.cpp - Transformations on Driver Types ---------------------===//
Daniel Dunbarb1efcd82009-03-13 11:27:05 +00002//
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
10#include "clang/Driver/Phases.h"
David Blaikie548f6c82011-09-23 05:57:42 +000011#include "llvm/Support/ErrorHandling.h"
Daniel Dunbarb1efcd82009-03-13 11:27:05 +000012
13#include <cassert>
14
15using namespace clang::driver;
16
17const char *phases::getPhaseName(ID Id) {
18 switch (Id) {
Daniel Dunbar20933352009-03-13 17:52:07 +000019 case Preprocess: return "preprocessor";
Daniel Dunbar3de1e7c2009-03-13 11:36:01 +000020 case Precompile: return "precompiler";
21 case Compile: return "compiler";
22 case Assemble: return "assembler";
23 case Link: return "linker";
Daniel Dunbarb1efcd82009-03-13 11:27:05 +000024 }
25
David Blaikieb219cfc2011-09-23 05:06:16 +000026 llvm_unreachable("Invalid phase id.");
Daniel Dunbarb1efcd82009-03-13 11:27:05 +000027}