]> granicus.if.org Git - clang/blobdiff - include/clang/Driver/Types.h
Header guard canonicalization, clang part.
[clang] / include / clang / Driver / Types.h
index f9f7601c7cbb40ccc17f8700e74e8183b0b0288d..34442eb6379f7130b2b33b4c9986a1ad036c45a1 100644 (file)
@@ -7,8 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef CLANG_DRIVER_TYPES_H_
-#define CLANG_DRIVER_TYPES_H_
+#ifndef LLVM_CLANG_DRIVER_TYPES_H
+#define LLVM_CLANG_DRIVER_TYPES_H
+
+#include "clang/Driver/Phases.h"
+#include "llvm/ADT/SmallVector.h"
 
 namespace clang {
 namespace driver {
@@ -21,7 +24,7 @@ namespace types {
     TY_LAST
   };
 
-  /// getTypeName - Return the name of the type for \arg Id.
+  /// getTypeName - Return the name of the type for \p Id.
   const char *getTypeName(ID Id);
 
   /// getPreprocessedType - Get the ID of the type for this input when
@@ -31,7 +34,7 @@ namespace types {
 
   /// getTypeTempSuffix - Return the suffix to use when creating a
   /// temp file of this type, or null if unspecified.
-  const char *getTypeTempSuffix(ID Id);
+  const char *getTypeTempSuffix(ID Id, bool CLMode = false);
 
   /// onlyAssembleType - Should this type only be assembled.
   bool onlyAssembleType(ID Id);
@@ -54,14 +57,33 @@ namespace types {
   /// types).
   bool canLipoType(ID Id);
 
+  /// isAcceptedByClang - Can clang handle this input type.
+  bool isAcceptedByClang(ID Id);
+
+  /// isCXX - Is this a "C++" input (C++ and Obj-C++ sources and headers).
+  bool isCXX(ID Id);
+
+  /// isObjC - Is this an "ObjC" input (Obj-C and Obj-C++ sources and headers).
+  bool isObjC(ID Id);
+
   /// lookupTypeForExtension - Lookup the type to use for the file
-  /// extension \arg Ext.
+  /// extension \p Ext.
   ID lookupTypeForExtension(const char *Ext);
 
   /// lookupTypeForTypSpecifier - Lookup the type to use for a user
   /// specified type name.
   ID lookupTypeForTypeSpecifier(const char *Name);
 
+  /// getCompilationPhases - Get the list of compilation phases ('Phases') to be
+  /// done for type 'Id'.
+  void getCompilationPhases(
+    ID Id,
+    llvm::SmallVectorImpl<phases::ID> &Phases);
+
+  /// lookupCXXTypeForCType - Lookup CXX input type that corresponds to given
+  /// C type (used for clang++ emulation of g++ behaviour)
+  ID lookupCXXTypeForCType(ID Id);
+
 } // end namespace types
 } // end namespace driver
 } // end namespace clang