]> granicus.if.org Git - clang/commitdiff
Driver: Add types::canLipoType helper method.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 12 Mar 2009 18:21:41 +0000 (18:21 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 12 Mar 2009 18:21:41 +0000 (18:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66807 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Types.h
lib/Driver/Types.cpp

index d5c79864348babec39586b720b5d096ef022a583..f9f7601c7cbb40ccc17f8700e74e8183b0b0288d 100644 (file)
@@ -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);
index a8eabeaacab1b6c45599747f7d248f81d90b995a..7affa2d93a69e594e88440f4660cfbd25ced5131 100644 (file)
@@ -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);