[cfe-commits] r127938 - /cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Ken Dyck kd at kendyck.com
Fri Mar 18 18:28:07 PDT 2011


Author: kjdyck
Date: Fri Mar 18 20:28:06 2011
New Revision: 127938

URL: http://llvm.org/viewvc/llvm-project?rev=127938&view=rev
Log:
Use CharUnits's new increment operator. No change in functionality intended.

Modified:
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=127938&r1=127937&r2=127938&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Fri Mar 18 20:28:06 2011
@@ -252,7 +252,7 @@
     }
 
     Elements.push_back(llvm::ConstantInt::get(CGM.getLLVMContext(), Tmp));
-    NextFieldOffsetInChars += CharUnits::One();
+    ++NextFieldOffsetInChars;
 
     FieldValue = FieldValue.trunc(FieldValue.getBitWidth() - CharWidth);
   }
@@ -274,7 +274,7 @@
   // Append the last element.
   Elements.push_back(llvm::ConstantInt::get(CGM.getLLVMContext(),
                                             FieldValue));
-  NextFieldOffsetInChars += CharUnits::One();
+  ++NextFieldOffsetInChars;
 }
 
 void ConstStructBuilder::AppendPadding(CharUnits PadSize) {





More information about the cfe-commits mailing list