1 //===--- Types.h - Input & Temporary Driver Types ---------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef CLANG_DRIVER_TYPES_H_
11 #define CLANG_DRIVER_TYPES_H_
13 #include "clang/Driver/Phases.h"
20 #define TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) TY_##ID,
21 #include "clang/Driver/Types.def"
26 /// getTypeName - Return the name of the type for \arg Id.
27 const char *getTypeName(ID Id);
29 /// getPreprocessedType - Get the ID of the type for this input when
30 /// it has been preprocessed, or INVALID if this input is not
32 ID getPreprocessedType(ID Id);
34 /// getTypeTempSuffix - Return the suffix to use when creating a
35 /// temp file of this type, or null if unspecified.
36 const char *getTypeTempSuffix(ID Id);
38 /// onlyAssembleType - Should this type only be assembled.
39 bool onlyAssembleType(ID Id);
41 /// onlyPrecompileType - Should this type only be precompiled.
42 bool onlyPrecompileType(ID Id);
44 /// canTypeBeUserSpecified - Can this type be specified on the
45 /// command line (by the type name); this is used when forwarding
47 bool canTypeBeUserSpecified(ID Id);
49 /// appendSuffixForType - When generating outputs of this type,
50 /// should the suffix be appended (instead of replacing the existing
52 bool appendSuffixForType(ID Id);
54 /// canLipoType - Is this type acceptable as the output of a
55 /// universal build (currently, just the Nothing, Image, and Object
57 bool canLipoType(ID Id);
59 /// isAcceptedByClang - Can clang handle this input type.
60 bool isAcceptedByClang(ID Id);
62 /// isCXX - Is this a "C++" input (C++ and Obj-C++ sources and headers).
65 /// lookupTypeForExtension - Lookup the type to use for the file
66 /// extension \arg Ext.
67 ID lookupTypeForExtension(const char *Ext);
69 /// lookupTypeForTypSpecifier - Lookup the type to use for a user
70 /// specified type name.
71 ID lookupTypeForTypeSpecifier(const char *Name);
73 /// getNumCompilationPhases - Return the complete number of phases
74 /// to be done for this type.
75 unsigned getNumCompilationPhases(ID Id);
77 /// getCompilationPhase - Return the \args N th compilation phase to
78 /// be done for this type.
79 phases::ID getCompilationPhase(ID Id, unsigned N);
81 } // end namespace types
82 } // end namespace driver
83 } // end namespace clang