[clang] 2474833 - [Clang][AMDGPU] Handle builtin types more generically. NFC. (#109004)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 18 01:32:40 PDT 2024


Author: Jay Foad
Date: 2024-09-18T09:32:37+01:00
New Revision: 24748339f517ede038b45202680d281b38809ceb

URL: https://github.com/llvm/llvm-project/commit/24748339f517ede038b45202680d281b38809ceb
DIFF: https://github.com/llvm/llvm-project/commit/24748339f517ede038b45202680d281b38809ceb.diff

LOG: [Clang][AMDGPU] Handle builtin types more generically. NFC. (#109004)

Tweak encodeTypeForFunctionPointerAuth to handle all AMDGPU builtin
types generically instead of just __amdgpu_buffer_rsrc_t which happens
to be the only one defined so far.

Added: 
    

Modified: 
    clang/lib/AST/ASTContext.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 67841a30a571f3..ebd4a41ee6367a 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -3377,7 +3377,8 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx,
 #include "clang/Basic/HLSLIntangibleTypes.def"
     case BuiltinType::Dependent:
       llvm_unreachable("should never get here");
-    case BuiltinType::AMDGPUBufferRsrc:
+#define AMDGPU_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
+#include "clang/Basic/AMDGPUTypes.def"
     case BuiltinType::WasmExternRef:
 #define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
 #include "clang/Basic/RISCVVTypes.def"


        


More information about the cfe-commits mailing list