blob: 5b776c63f713a7a75c0c57d24228c0455a7004ac [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//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Daniel Dunbar58cac7c2009-03-13 11:27:05 +00006//
7//===----------------------------------------------------------------------===//
8
9#include "clang/Driver/Phases.h"
David Blaikie79000202011-09-23 05:57:42 +000010#include "llvm/Support/ErrorHandling.h"
Daniel Dunbar58cac7c2009-03-13 11:27:05 +000011#include <cassert>
12
13using namespace clang::driver;
14
15const char *phases::getPhaseName(ID Id) {
16 switch (Id) {
Daniel Dunbar7326ad52009-03-13 17:52:07 +000017 case Preprocess: return "preprocessor";
Daniel Dunbar286c39a2009-03-13 11:36:01 +000018 case Precompile: return "precompiler";
19 case Compile: return "compiler";
Bob Wilson23a55f12014-12-21 07:00:00 +000020 case Backend: return "backend";
Daniel Dunbar286c39a2009-03-13 11:36:01 +000021 case Assemble: return "assembler";
22 case Link: return "linker";
Daniel Dunbar58cac7c2009-03-13 11:27:05 +000023 }
24
David Blaikie83d382b2011-09-23 05:06:16 +000025 llvm_unreachable("Invalid phase id.");
Daniel Dunbar58cac7c2009-03-13 11:27:05 +000026}