diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-12 18:21:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-12 18:21:41 +0000 |
commit | 208f0269e72ed0f70d3f09498d6123c62c68dbcf (patch) | |
tree | 4df162c4d9cff7468d9541ff1cb20975eb361d91 | |
parent | d5f7d2509b5276fee224729b3f6554dbce34a97d (diff) | |
download | bcm5719-llvm-208f0269e72ed0f70d3f09498d6123c62c68dbcf.tar.gz bcm5719-llvm-208f0269e72ed0f70d3f09498d6123c62c68dbcf.zip |
Driver: Add types::canLipoType helper method.
llvm-svn: 66807
-rw-r--r-- | clang/include/clang/Driver/Types.h | 5 | ||||
-rw-r--r-- | clang/lib/Driver/Types.cpp | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/Types.h b/clang/include/clang/Driver/Types.h index d5c79864348..f9f7601c7cb 100644 --- a/clang/include/clang/Driver/Types.h +++ b/clang/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/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp index a8eabeaacab..7affa2d93a6 100644 --- a/clang/lib/Driver/Types.cpp +++ b/clang/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); |