[clang] [clang] Resolve FIXME: Use HalfWidth and HalfAlign for shorts (PR #81367)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 10 10:07:45 PST 2024
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81367
>From ebd724f537fe0f7c1ad468d15bb13245c7d56d9f Mon Sep 17 00:00:00 2001
From: Rose <83477269+AtariDreams at users.noreply.github.com>
Date: Sat, 10 Feb 2024 12:35:20 -0500
Subject: [PATCH] [clang] Resolve FIXME: Use HalfWidth and HalfAlign for shorts
Shorts are half an int, so HalfWidth and HalfAlign apply here.
---
clang/include/clang/Basic/TargetInfo.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h
index 48e9cec482755c..00851dc2fb0d07 100644
--- a/clang/include/clang/Basic/TargetInfo.h
+++ b/clang/include/clang/Basic/TargetInfo.h
@@ -489,11 +489,11 @@ class TargetInfo : public TransferrableTargetInfo,
/// Return the size of 'signed short' and 'unsigned short' for this
/// target, in bits.
- unsigned getShortWidth() const { return 16; } // FIXME
+ unsigned getShortWidth() const { return HalfWidth; }
/// Return the alignment of 'signed short' and 'unsigned short' for
/// this target.
- unsigned getShortAlign() const { return 16; } // FIXME
+ unsigned getShortAlign() const { return HalfAlign; }
/// getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for
/// this target, in bits.
More information about the cfe-commits
mailing list