[PATCH] D105320: [CodeView] Skip emitting values bigger than supported by APInt.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 7 10:01:55 PDT 2021
rnk added a comment.
Please add a test case for this.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:3166
+
+ // TODO: Need to support bigger ints like __int128.
+ if (Value.getNumWords() <= 1U) {
----------------
This avoids the crash, but I believe it will produce corrupt codeview records. I think it would be preferable to saturate the APSInt to the maximum representable encoded integer value in CodeViewRecordIO in the streaming and writing cases. There is prior art for this: long strings are truncated, for example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105320/new/
https://reviews.llvm.org/D105320
More information about the llvm-commits
mailing list