[cfe-commits] r66807 - in /cfe/trunk: include/clang/Driver/Types.h lib/Driver/Types.cpp

Daniel Dunbar daniel at zuster.org
Thu Mar 12 11:21:41 PDT 2009


Author: ddunbar
Date: Thu Mar 12 13:21:41 2009
New Revision: 66807

URL: http://llvm.org/viewvc/llvm-project?rev=66807&view=rev
Log:
Driver: Add types::canLipoType helper method.

Modified:
    cfe/trunk/include/clang/Driver/Types.h
    cfe/trunk/lib/Driver/Types.cpp

Modified: cfe/trunk/include/clang/Driver/Types.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Types.h?rev=66807&r1=66806&r2=66807&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Types.h (original)
+++ cfe/trunk/include/clang/Driver/Types.h Thu Mar 12 13:21:41 2009
@@ -49,6 +49,11 @@
   /// 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);

Modified: cfe/trunk/lib/Driver/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Types.cpp?rev=66807&r1=66806&r2=66807&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Types.cpp (original)
+++ cfe/trunk/lib/Driver/Types.cpp Thu Mar 12 13:21:41 2009
@@ -64,6 +64,12 @@
   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);
 





More information about the cfe-commits mailing list