[cfe-commits] r41495 - /cfe/trunk/include/clang/Basic/TargetInfo.h

Chris Lattner sabre at nondot.org
Mon Aug 27 09:48:59 PDT 2007


Author: lattner
Date: Mon Aug 27 11:48:59 2007
New Revision: 41495

URL: http://llvm.org/viewvc/llvm-project?rev=41495&view=rev
Log:
Add enum type conversion policies, patch by Keith Bauer

Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=41495&r1=41494&r2=41495&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Mon Aug 27 11:48:59 2007
@@ -172,6 +172,20 @@
     Align = WCharAlign;
   }
   
+  /// EnumTypePolicy - This enum value contains a list of the various policies
+  /// that a target can have about how enums are converted to integer types.
+  enum EnumTypePolicy {
+    AlwaysInt,      // 'int' or 'unsigned'
+    ShortestType    // -fshort-enums
+  };
+  
+  /// getEnumTypePolicy - get the target's policy for what type an enum should
+  /// be compatible with.
+  EnumTypePolicy getEnumTypePolicy(SourceLocation Loc) {
+    // FIXME: implement correctly
+    return AlwaysInt;
+  }
+  
   /// getIntMaxTWidth - Return the size of intmax_t and uintmax_t for this
   /// target, in bits.  
   unsigned getIntMaxTWidth(SourceLocation Loc) {





More information about the cfe-commits mailing list