[PATCH] D30166: Honor __unaligned in codegen for declarations and expressions
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 20 15:03:10 PST 2017
ahatanak added inline comments.
================
Comment at: include/clang/AST/ASTContext.h:1910
+ if (T.getQualifiers().hasUnaligned())
+ TI.Align = 8;
+ return TI;
----------------
Is it better to call TargetInfo::getCharWidth() instead of assigning a hardcoded number here?
================
Comment at: lib/AST/ExprConstant.cpp:5678
+ return CharUnits::One();
+ else
+ return Info.Ctx.toCharUnitsFromBits(
----------------
You can remove an else after return.
https://reviews.llvm.org/D30166
More information about the cfe-commits
mailing list