[PATCH] D25620: DebugInfo: introduce DIAlignment type
Victor Leschuk via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 04:01:08 PDT 2016
vleschuk added a comment.
In https://reviews.llvm.org/D25620#570582, @aprantl wrote:
> I support this.
>
> One question: What happens when we read bitcode that contains an alignment field with a value larger > 2^32?
> Does the bitcode reader throw an error? Do we even care to support a non-breaking upgrade path for this?
We already do check this in frontend (Sema):
// Alignment calculations can wrap around if it's greater than 2**28.
unsigned MaxValidAlignment =
Context.getTargetInfo().getTriple().isOSBinFormatCOFF() ? 8192
: 268435456;
I have added check in BitcodeReader just in case.
https://reviews.llvm.org/D25620
More information about the llvm-commits
mailing list