[all-commits] [llvm/llvm-project] c0a6f7: Use precise types in DWARF BestForm methods (#126309)
Tom Tromey via All-commits
all-commits at lists.llvm.org
Fri Feb 21 12:24:09 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c0a6f7acf8b630df438fc0de04028148af093cf1
https://github.com/llvm/llvm-project/commit/c0a6f7acf8b630df438fc0de04028148af093cf1
Author: Tom Tromey <tromey at adacore.com>
Date: 2025-02-21 (Fri, 21 Feb 2025)
Changed paths:
M llvm/include/llvm/CodeGen/DIE.h
Log Message:
-----------
Use precise types in DWARF BestForm methods (#126309)
I noticed that DIEInteger::BestForm used a cast to char:
if ((char)Int == SignedInt)
If 'char' happens to be unsigned, this will not behave correctly. Then I
also noticed that this code assumes the size of 'short' and 'int'.
This patch changes this code to use more precise types. No functional
change should be visible on ordinary hosts.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list