[clang] [clang][NFC] Update isAuxBuiltinID comment (PR #128038)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 10:14:27 PST 2025


https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/128038

>From e866ecff509662fd1f9942fb415291d43e20ee31 Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick" <nick.sarnie at intel.com>
Date: Thu, 20 Feb 2025 09:52:35 -0800
Subject: [PATCH 1/2] [clang][NFC] Update isAuxBuiltinID comment

Signed-off-by: Sarnie, Nick <nick.sarnie at intel.com>
---
 clang/include/clang/Basic/Builtins.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h
index 6d29b4315e5a7..91a03c3a51da2 100644
--- a/clang/include/clang/Basic/Builtins.h
+++ b/clang/include/clang/Basic/Builtins.h
@@ -408,7 +408,9 @@ class Context {
 
   unsigned getRequiredVectorWidth(unsigned ID) const;
 
-  /// Return true if builtin ID belongs to AuxTarget.
+  /// Return true if builtin ID belongs to only the AuxTarget.
+  /// Return false if builtin ID belongs to both the primary
+  /// and auxiliary target.
   bool isAuxBuiltinID(unsigned ID) const {
     return ID >= (Builtin::FirstTSBuiltin + NumTargetBuiltins);
   }

>From e7b0641a4fedf703e8057cf97cd447c8492a267a Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick" <nick.sarnie at intel.com>
Date: Thu, 20 Feb 2025 10:14:15 -0800
Subject: [PATCH 2/2] address feedback

Signed-off-by: Sarnie, Nick <nick.sarnie at intel.com>
---
 clang/include/clang/Basic/Builtins.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h
index 91a03c3a51da2..d1c1ab44417fa 100644
--- a/clang/include/clang/Basic/Builtins.h
+++ b/clang/include/clang/Basic/Builtins.h
@@ -408,9 +408,8 @@ class Context {
 
   unsigned getRequiredVectorWidth(unsigned ID) const;
 
-  /// Return true if builtin ID belongs to only the AuxTarget.
-  /// Return false if builtin ID belongs to both the primary
-  /// and auxiliary target.
+  /// Return true if the builtin ID belongs exclusively to the AuxTarget,
+  /// and false if it belongs to both primary and aux target, or neither.
   bool isAuxBuiltinID(unsigned ID) const {
     return ID >= (Builtin::FirstTSBuiltin + NumTargetBuiltins);
   }



More information about the cfe-commits mailing list