diff options
author | Matheus Izvekov <mizvekov@gmail.com> | 2021-07-02 00:26:17 +0200 |
---|---|---|
committer | Matheus Izvekov <mizvekov@gmail.com> | 2021-07-26 22:15:26 +0200 |
commit | f84c70a3793909ec16b3e53a502f0f9ea99c6af3 (patch) | |
tree | 9291e7d8873bba0594df89ef8fd765f2426ee84a /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | |
parent | dead50d4427cbdd5f41c02c5441270822f702730 (diff) | |
download | llvm-f84c70a3793909ec16b3e53a502f0f9ea99c6af3.zip llvm-f84c70a3793909ec16b3e53a502f0f9ea99c6af3.tar.gz llvm-f84c70a3793909ec16b3e53a502f0f9ea99c6af3.tar.bz2 |
[CodeView] Saturate values bigger than supported by APInt.
This fixes an assert firing when compiling code which involves 128 bit
integrals.
This would trigger runtime checks similar to this:
```
Assertion failed: getMinSignedBits() <= 64 && "Too many bits for int64_t", file llvm/include/llvm/ADT/APInt.h, line 1646
```
To get around this, we just saturate those big values.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D105320
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h index 9eee549..d133474 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h @@ -315,6 +315,8 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDebug : public DebugHandlerBase { void collectDebugInfoForGlobals(); void emitDebugInfoForGlobals(); void emitGlobalVariableList(ArrayRef<CVGlobalVariable> Globals); + void emitConstantSymbolRecord(const DIType *DTy, APSInt &Value, + const std::string &QualifiedName); void emitDebugInfoForGlobal(const CVGlobalVariable &CVGV); void emitStaticConstMemberList(); |