]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/clang/Driver/Types.h
Import Clang, at r72732.
[FreeBSD/FreeBSD.git] / include / clang / Driver / Types.h
1 //===--- Types.h - Input & Temporary Driver Types ---------------*- C++ -*-===//
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 #ifndef CLANG_DRIVER_TYPES_H_
11 #define CLANG_DRIVER_TYPES_H_
12
13 #include "clang/Driver/Phases.h"
14
15 namespace clang {
16 namespace driver {
17 namespace types {
18   enum ID {
19     TY_INVALID,
20 #define TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) TY_##ID,
21 #include "clang/Driver/Types.def"
22 #undef TYPE
23     TY_LAST
24   };
25
26   /// getTypeName - Return the name of the type for \arg Id.
27   const char *getTypeName(ID Id);
28
29   /// getPreprocessedType - Get the ID of the type for this input when
30   /// it has been preprocessed, or INVALID if this input is not
31   /// preprocessed.
32   ID getPreprocessedType(ID Id);
33
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);
37
38   /// onlyAssembleType - Should this type only be assembled.
39   bool onlyAssembleType(ID Id);
40
41   /// onlyPrecompileType - Should this type only be precompiled.
42   bool onlyPrecompileType(ID Id);
43
44   /// canTypeBeUserSpecified - Can this type be specified on the
45   /// command line (by the type name); this is used when forwarding
46   /// commands to gcc.
47   bool canTypeBeUserSpecified(ID Id);
48
49   /// appendSuffixForType - When generating outputs of this type,
50   /// should the suffix be appended (instead of replacing the existing
51   /// suffix).
52   bool appendSuffixForType(ID Id);
53
54   /// canLipoType - Is this type acceptable as the output of a
55   /// universal build (currently, just the Nothing, Image, and Object
56   /// types).
57   bool canLipoType(ID Id);
58
59   /// isAcceptedByClang - Can clang handle this input type.
60   bool isAcceptedByClang(ID Id);
61
62   /// isCXX - Is this a "C++" input (C++ and Obj-C++ sources and headers).
63   bool isCXX(ID Id);
64
65   /// lookupTypeForExtension - Lookup the type to use for the file
66   /// extension \arg Ext.
67   ID lookupTypeForExtension(const char *Ext);
68
69   /// lookupTypeForTypSpecifier - Lookup the type to use for a user
70   /// specified type name.
71   ID lookupTypeForTypeSpecifier(const char *Name);
72
73   /// getNumCompilationPhases - Return the complete number of phases
74   /// to be done for this type.
75   unsigned getNumCompilationPhases(ID Id);
76
77   /// getCompilationPhase - Return the \args N th compilation phase to
78   /// be done for this type.
79   phases::ID getCompilationPhase(ID Id, unsigned N);
80
81 } // end namespace types
82 } // end namespace driver
83 } // end namespace clang
84
85 #endif