mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-21 18:22:53 +01:00
Fix clang debug info irgen of i128 enums
DIEnumerator stores an APInt as of April 2020, so now we don't need to truncate the enumerator value to 64 bits. Fixes assertions during IRGen. Split from D105320, thanks to Matheus Izvekov for the test case and report. Differential Revision: https://reviews.llvm.org/D106585
This commit is contained in:
parent
c4acdbbb3c
commit
a85a7951e1
@ -181,7 +181,9 @@ namespace llvm {
|
||||
DIFile *File);
|
||||
|
||||
/// Create a single enumerator value.
|
||||
DIEnumerator *createEnumerator(StringRef Name, int64_t Val, bool IsUnsigned = false);
|
||||
DIEnumerator *createEnumerator(StringRef Name, APSInt Value);
|
||||
DIEnumerator *createEnumerator(StringRef Name, int64_t Val,
|
||||
bool IsUnsigned = false);
|
||||
|
||||
/// Create a DWARF unspecified type.
|
||||
DIBasicType *createUnspecifiedType(StringRef Name);
|
||||
|
@ -250,6 +250,11 @@ DIEnumerator *DIBuilder::createEnumerator(StringRef Name, int64_t Val,
|
||||
Name);
|
||||
}
|
||||
|
||||
DIEnumerator *DIBuilder::createEnumerator(StringRef Name, APSInt Value) {
|
||||
assert(!Name.empty() && "Unable to create enumerator without name");
|
||||
return DIEnumerator::get(VMContext, APInt(Value), Value.isUnsigned(), Name);
|
||||
}
|
||||
|
||||
DIBasicType *DIBuilder::createUnspecifiedType(StringRef Name) {
|
||||
assert(!Name.empty() && "Unable to create type without name");
|
||||
return DIBasicType::get(VMContext, dwarf::DW_TAG_unspecified_type, Name);
|
||||
|
Loading…
Reference in New Issue
Block a user