[PATCH] D19667: [ubsan] Minimize size of data for type_mismatch
Filipe Cabecinhas via cfe-commits
cfe-commits at lists.llvm.org
Fri May 13 08:25:21 PDT 2016
filcab added a comment.
Hi Richard. Just want to double-check something. If we have no alignment value, for this check, can we assume 1?
It seems to me that that shouldn't be a problem, but wanted to double-check.
================
Comment at: lib/CodeGen/CGExpr.cpp:579
@@ -578,1 +578,3 @@
+ // Make sure we're not losing information. Alignment needs to be a power of 2
+ assert(!AlignVal || (uint64_t)1 << llvm::Log2_64(AlignVal) == AlignVal);
llvm::Constant *StaticData[] = {
----------------
Would it be acceptable to set AlignVal to 1 if it's 0?
http://reviews.llvm.org/D19667
More information about the cfe-commits
mailing list