Driver: Add types::canLipoType helper method.

llvm-svn: 66807
This commit is contained in:
Daniel Dunbar 2009-03-12 18:21:41 +00:00
parent d5f7d2509b
commit 208f0269e7
2 changed files with 11 additions and 0 deletions

View 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);

View 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);