blob: 7ae270857f4d02feb3d9b624bf10616ddbf75cec [file] [log] [blame]
Nick Lewycky6da90772010-12-31 17:31:54 +00001//===--- Phases.cpp - Transformations on Driver Types ---------------------===//
Daniel Dunbar58cac7c2009-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 Blaikie79000202011-09-23 05:57:42 +000011#include "llvm/Support/ErrorHandling.h"
Daniel Dunbar58cac7c2009-03-13 11:27:05 +000012#include <cassert>
13
14using namespace clang::driver;
15
16const char *phases::getPhaseName(ID Id) {
17 switch (Id) {
Daniel Dunbar7326ad52009-03-13 17:52:07 +000018 case Preprocess: return "preprocessor";
Daniel Dunbar286c39a2009-03-13 11:36:01 +000019 case Precompile: return "precompiler";
20 case Compile: return "compiler";
Bob Wilson23a55f12014-12-21 07:00:00 +000021 case Backend: return "backend";
Daniel Dunbar286c39a2009-03-13 11:36:01 +000022 case Assemble: return "assembler";
23 case Link: return "linker";
Daniel Dunbar58cac7c2009-03-13 11:27:05 +000024 }
25
David Blaikie83d382b2011-09-23 05:06:16 +000026 llvm_unreachable("Invalid phase id.");
Daniel Dunbar58cac7c2009-03-13 11:27:05 +000027}