[cfe-commits] r123421 - /cfe/trunk/lib/AST/ExprConstant.cpp

Ken Dyck ken.dyck at onsemi.com
Thu Jan 13 18:01:36 PST 2011


Author: kjdyck
Date: Thu Jan 13 20:01:36 2011
New Revision: 123421

URL: http://llvm.org/viewvc/llvm-project?rev=123421&view=rev
Log:
Replace a literal '8' with getCharWidth().

Modified:
    cfe/trunk/lib/AST/ExprConstant.cpp

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=123421&r1=123420&r2=123421&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Jan 13 20:01:36 2011
@@ -404,7 +404,8 @@
       break;
   }
 
-  Result.Offset += CharUnits::fromQuantity(RL.getFieldOffset(i) / 8);
+  Result.Offset += 
+      CharUnits::fromQuantity(RL.getFieldOffset(i) / Info.Ctx.getCharWidth());
   return true;
 }
 





More information about the cfe-commits mailing list