[cfe-commits] r40901 - /cfe/trunk/include/clang/AST/Type.h

Chris Lattner sabre at nondot.org
Tue Aug 7 10:33:34 PDT 2007


Author: lattner
Date: Tue Aug  7 12:33:34 2007
New Revision: 40901

URL: http://llvm.org/viewvc/llvm-project?rev=40901&view=rev
Log:
add some helpers

Modified:
    cfe/trunk/include/clang/AST/Type.h

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=40901&r1=40900&r2=40901&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Tue Aug  7 12:33:34 2007
@@ -109,6 +109,12 @@
   bool isRestrictQualified() const {
     return ThePtr & Restrict;
   }
+  
+  /// addConst/addVolatile/addRestrict - add the specified type qual to this
+  /// QualType.
+  void addConst()    { ThePtr |= Const; }
+  void addVolatile() { ThePtr |= Volatile; }
+  void addRestrict() { ThePtr |= Restrict; }
 
   QualType getQualifiedType(unsigned TQs) const {
     return QualType(getTypePtr(), TQs);





More information about the cfe-commits mailing list