diff options
-rw-r--r-- | include/clang/Driver/Types.h | 5 | ||||
-rw-r--r-- | lib/Driver/Types.cpp | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Driver/Types.h b/include/clang/Driver/Types.h index d5c7986434..f9f7601c7c 100644 --- a/include/clang/Driver/Types.h +++ b/include/clang/Driver/Types.h @@ -49,6 +49,11 @@ namespace types { /// suffix). bool appendSuffixForType(ID Id); + /// canLipoType - Is this type acceptable as the output of a + /// universal build (currently, just the Nothing, Image, and Object + /// types). + bool canLipoType(ID Id); + /// lookupTypeForExtension - Lookup the type to use for the file /// extension \arg Ext. ID lookupTypeForExtension(const char *Ext); diff --git a/lib/Driver/Types.cpp b/lib/Driver/Types.cpp index a8eabeaaca..7affa2d93a 100644 --- a/lib/Driver/Types.cpp +++ b/lib/Driver/Types.cpp @@ -64,6 +64,12 @@ bool types::appendSuffixForType(ID Id) { return strchr(getInfo(Id).Flags, 'A'); } +bool types::canLipoType(ID Id) { + return (Id == TY_Nothing || + Id == TY_Image || + Id == TY_Object); +} + types::ID types::lookupTypeForExtension(const char *Ext) { unsigned N = strlen(Ext); |