Nick Lewycky | 3fdcc6f | 2010-12-31 17:31:54 +0000 | [diff] [blame] | 1 | //===--- Phases.cpp - Transformations on Driver Types ---------------------===// |
Daniel Dunbar | b1efcd8 | 2009-03-13 11:27:05 +0000 | [diff] [blame] | 2 | // |
| 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 Blaikie | 548f6c8 | 2011-09-23 05:57:42 +0000 | [diff] [blame] | 11 | #include "llvm/Support/ErrorHandling.h" |
Daniel Dunbar | b1efcd8 | 2009-03-13 11:27:05 +0000 | [diff] [blame] | 12 | |
| 13 | #include <cassert> |
| 14 | |
| 15 | using namespace clang::driver; |
| 16 | |
| 17 | const char *phases::getPhaseName(ID Id) { |
| 18 | switch (Id) { |
Daniel Dunbar | 2093335 | 2009-03-13 17:52:07 +0000 | [diff] [blame] | 19 | case Preprocess: return "preprocessor"; |
Daniel Dunbar | 3de1e7c | 2009-03-13 11:36:01 +0000 | [diff] [blame] | 20 | case Precompile: return "precompiler"; |
| 21 | case Compile: return "compiler"; |
| 22 | case Assemble: return "assembler"; |
| 23 | case Link: return "linker"; |
Daniel Dunbar | b1efcd8 | 2009-03-13 11:27:05 +0000 | [diff] [blame] | 24 | } |
| 25 | |
David Blaikie | b219cfc | 2011-09-23 05:06:16 +0000 | [diff] [blame] | 26 | llvm_unreachable("Invalid phase id."); |
Daniel Dunbar | b1efcd8 | 2009-03-13 11:27:05 +0000 | [diff] [blame] | 27 | } |