aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorCollin Baker <collinbaker@chromium.org>2023-03-14 09:57:44 -0400
committerAaron Ballman <aaron@aaronballman.com>2023-03-14 09:59:24 -0400
commit48fb6659610a3177e8606681046dfa0d19f67203 (patch)
treed3efc9fe7426cc1fc2654e2d0fc369990f31cc93 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentd12af65d4626ac69faf8f56afd30971b8a2fc3b3 (diff)
downloadllvm-48fb6659610a3177e8606681046dfa0d19f67203.zip
llvm-48fb6659610a3177e8606681046dfa0d19f67203.tar.gz
llvm-48fb6659610a3177e8606681046dfa0d19f67203.tar.bz2
[libclang] No longer attempt to get a dependent bit-width
Handle template parameter-dependent bit field widths in libclang In a class template, a bit field's width may depend on a template parameter. In this case the width expression cannot be evaluated. Previously clang_getFieldDeclBitWidth() would assert, or cause memory unsafety and return an invalid result if assertions are disabled. This adds a check for this case which returns an error code. This work was largely taken from an earlier patch which was reverted due to an accidental API duplication (https://reviews.llvm.org/D130303). Fixes: https://github.com/llvm/llvm-project/issues/56644 Co-authored-by: Aaron Ballman <aaron@aaronballman.com> Differential Revision: https://reviews.llvm.org/D146039
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions