Home | History | Annotate | Download | only in Driver

Lines Matching refs:Id

23   ID PreprocessedType;
27 #define TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) \
34 static const TypeInfo &getInfo(unsigned id) {
35 assert(id > 0 && id - 1 < numTypes && "Invalid Type ID.");
36 return TypeInfos[id - 1];
39 const char *types::getTypeName(ID Id) {
40 return getInfo(Id).Name;
43 types::ID types::getPreprocessedType(ID Id) {
44 return getInfo(Id).PreprocessedType;
47 const char *types::getTypeTempSuffix(ID Id, bool CLMode) {
48 if (Id == TY_Object && CLMode)
50 if (Id == TY_Image && CLMode)
52 if (Id == TY_PP_Asm && CLMode)
54 return getInfo(Id).TempSuffix;
57 bool types::onlyAssembleType(ID Id) {
58 return strchr(getInfo(Id).Flags, 'a');
61 bool types::onlyPrecompileType(ID Id) {
62 return strchr(getInfo(Id).Flags, 'p');
65 bool types::canTypeBeUserSpecified(ID Id) {
66 return strchr(getInfo(Id).Flags, 'u');
69 bool types::appendSuffixForType(ID Id) {
70 return strchr(getInfo(Id).Flags, 'A');
73 bool types::canLipoType(ID Id) {
74 return (Id == TY_Nothing ||
75 Id == TY_Image ||
76 Id == TY_Object ||
77 Id == TY_LTO_BC);
80 bool types::isAcceptedByClang(ID Id) {
81 switch (Id) {
104 bool types::isObjC(ID Id) {
105 switch (Id) {
117 bool types::isCXX(ID Id) {
118 switch (Id) {
131 bool types::isLLVMIR(ID Id) {
132 switch (Id) {
144 bool types::isCuda(ID Id) {
145 switch (Id) {
156 types::ID types::lookupTypeForExtension(const char *Ext) {
157 return llvm::StringSwitch<types::ID>(Ext)
210 types::ID types::lookupTypeForTypeSpecifier(const char *Name) {
212 types::ID Id = (types::ID) (i + 1);
213 if (canTypeBeUserSpecified(Id) &&
214 strcmp(Name, getInfo(Id).Name) == 0)
215 return Id;
222 void types::getCompilationPhases(ID Id, llvm::SmallVectorImpl<phases::ID> &P) {
223 if (Id != TY_Object) {
224 if (getPreprocessedType(Id) != TY_INVALID) {
228 if (onlyPrecompileType(Id)) {
231 if (!onlyAssembleType(Id)) {
235 if (Id != TY_CUDA_DEVICE)
240 if (!onlyPrecompileType(Id) && Id != TY_CUDA_DEVICE) {
248 ID types::lookupCXXTypeForCType(ID Id) {
249 switch (Id) {
251 return Id;