Skip to content

Commit 7c8f4ee

Browse files
committed
[LLVM][PDB] Use IsUnsigned flag for APInt correctly
1 parent 7dcea28 commit 7c8f4ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/include/llvm/DebugInfo/PDB/PDBTypes.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ struct Variant {
510510

511511
#define VARIANT_APSINT(Enum, NumBits, IsUnsigned) \
512512
case PDB_VariantType::Enum: \
513-
return APSInt(APInt(NumBits, Value.Enum), IsUnsigned);
513+
return APSInt( \
514+
APInt(NumBits, static_cast<uint64_t>(Value.Enum), !IsUnsigned), \
515+
IsUnsigned);
514516

515517
APSInt toAPSInt() const {
516518
switch (Type) {

0 commit comments

Comments
 (0)