r279799 - Sort list of driver-known file extensions. It was previously approximately
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 25 17:42:01 PDT 2016
Author: rsmith
Date: Thu Aug 25 19:41:59 2016
New Revision: 279799
URL: http://llvm.org/viewvc/llvm-project?rev=279799&view=rev
Log:
Sort list of driver-known file extensions. It was previously approximately
ordered by length then alphabetically; apply that order consistently.
Modified:
cfe/trunk/lib/Driver/Types.cpp
Modified: cfe/trunk/lib/Driver/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Types.cpp?rev=279799&r1=279798&r2=279799&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Types.cpp (original)
+++ cfe/trunk/lib/Driver/Types.cpp Thu Aug 25 19:41:59 2016
@@ -156,55 +156,55 @@ bool types::isCuda(ID Id) {
types::ID types::lookupTypeForExtension(const char *Ext) {
return llvm::StringSwitch<types::ID>(Ext)
.Case("c", TY_C)
+ .Case("C", TY_CXX)
+ .Case("F", TY_Fortran)
+ .Case("f", TY_PP_Fortran)
+ .Case("h", TY_CHeader)
+ .Case("H", TY_CXXHeader)
.Case("i", TY_PP_C)
.Case("m", TY_ObjC)
.Case("M", TY_ObjCXX)
- .Case("h", TY_CHeader)
- .Case("C", TY_CXX)
- .Case("H", TY_CXXHeader)
- .Case("f", TY_PP_Fortran)
- .Case("F", TY_Fortran)
- .Case("s", TY_PP_Asm)
- .Case("asm", TY_PP_Asm)
- .Case("S", TY_Asm)
.Case("o", TY_Object)
- .Case("obj", TY_Object)
- .Case("lib", TY_Object)
- .Case("ii", TY_PP_CXX)
- .Case("mi", TY_PP_ObjC)
- .Case("mm", TY_ObjCXX)
+ .Case("S", TY_Asm)
+ .Case("s", TY_PP_Asm)
.Case("bc", TY_LLVM_BC)
.Case("cc", TY_CXX)
.Case("CC", TY_CXX)
.Case("cl", TY_CL)
.Case("cp", TY_CXX)
.Case("cu", TY_CUDA)
- .Case("cui", TY_PP_CUDA)
.Case("hh", TY_CXXHeader)
+ .Case("ii", TY_PP_CXX)
.Case("ll", TY_LLVM_IR)
- .Case("hpp", TY_CXXHeader)
- .Case("ads", TY_Ada)
+ .Case("mi", TY_PP_ObjC)
+ .Case("mm", TY_ObjCXX)
+ .Case("rs", TY_RenderScript)
.Case("adb", TY_Ada)
+ .Case("ads", TY_Ada)
+ .Case("asm", TY_PP_Asm)
.Case("ast", TY_AST)
+ .Case("cpp", TY_CXX)
+ .Case("CPP", TY_CXX)
.Case("c++", TY_CXX)
.Case("C++", TY_CXX)
+ .Case("cui", TY_PP_CUDA)
.Case("cxx", TY_CXX)
- .Case("cpp", TY_CXX)
- .Case("CPP", TY_CXX)
.Case("CXX", TY_CXX)
+ .Case("F90", TY_Fortran)
+ .Case("f90", TY_PP_Fortran)
+ .Case("F95", TY_Fortran)
+ .Case("f95", TY_PP_Fortran)
.Case("for", TY_PP_Fortran)
.Case("FOR", TY_PP_Fortran)
.Case("fpp", TY_Fortran)
.Case("FPP", TY_Fortran)
- .Case("f90", TY_PP_Fortran)
- .Case("f95", TY_PP_Fortran)
- .Case("F90", TY_Fortran)
- .Case("F95", TY_Fortran)
+ .Case("gch", TY_PCH)
+ .Case("hpp", TY_CXXHeader)
+ .Case("lib", TY_Object)
.Case("mii", TY_PP_ObjCXX)
- .Case("pcm", TY_ModuleFile)
+ .Case("obj", TY_Object)
.Case("pch", TY_PCH)
- .Case("gch", TY_PCH)
- .Case("rs", TY_RenderScript)
+ .Case("pcm", TY_ModuleFile)
.Default(TY_INVALID);
}
More information about the cfe-commits
mailing list