diff --git a/llvm/lib/Target/BPF/BTFDebug.cpp b/llvm/lib/Target/BPF/BTFDebug.cpp index bed6bc98b1679..ba4b48990c647 100644 --- a/llvm/lib/Target/BPF/BTFDebug.cpp +++ b/llvm/lib/Target/BPF/BTFDebug.cpp @@ -235,7 +235,7 @@ void BTFTypeEnum64::completeType(BTFDebug &BDebug) { BTFEnum.NameOff = BDebug.addString(Enum->getName()); uint64_t Value; if (Enum->isUnsigned()) - Value = static_cast(Enum->getValue().getZExtValue()); + Value = Enum->getValue().getZExtValue(); else Value = static_cast(Enum->getValue().getSExtValue()); BTFEnum.Val_Lo32 = Value;