xref: /freebsd/contrib/llvm-project/clang/lib/Driver/Phases.cpp (revision 5b27928474e6a4103d65b347544705c40c9618fd)
10b57cec5SDimitry Andric //===--- Phases.cpp - Transformations on Driver Types ---------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "clang/Driver/Phases.h"
100b57cec5SDimitry Andric #include "llvm/Support/ErrorHandling.h"
110b57cec5SDimitry Andric #include <cassert>
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric using namespace clang::driver;
140b57cec5SDimitry Andric 
getPhaseName(ID Id)150b57cec5SDimitry Andric const char *phases::getPhaseName(ID Id) {
160b57cec5SDimitry Andric   switch (Id) {
170b57cec5SDimitry Andric   case Preprocess: return "preprocessor";
180b57cec5SDimitry Andric   case Precompile: return "precompiler";
190b57cec5SDimitry Andric   case Compile: return "compiler";
200b57cec5SDimitry Andric   case Backend: return "backend";
210b57cec5SDimitry Andric   case Assemble: return "assembler";
220b57cec5SDimitry Andric   case Link: return "linker";
23*a7dea167SDimitry Andric   case IfsMerge: return "ifsmerger";
240b57cec5SDimitry Andric   }
250b57cec5SDimitry Andric 
260b57cec5SDimitry Andric   llvm_unreachable("Invalid phase id.");
270b57cec5SDimitry Andric }
28