[clang] b805853 - [Hexagon] Make local array static in getIntrinsicForHexagonNonClangBuiltin

Krzysztof Parzyszek via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 22 09:48:29 PST 2022


Author: Krzysztof Parzyszek
Date: 2022-11-22T09:48:01-08:00
New Revision: b805853ccb4785811c04f27862a77eb9c8c286f7

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

LOG: [Hexagon] Make local array static in getIntrinsicForHexagonNonClangBuiltin

It should not be created on every call, the omission of `static` was a bug
in the patch that introduced it.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGBuiltin.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 7ae5508ae76d..801872dd700a 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -19171,7 +19171,7 @@ getIntrinsicForHexagonNonClangBuiltin(unsigned BuiltinID) {
     Intrinsic::ID IntrinsicID;
     unsigned VecLen;
   };
-  Info Infos[] = {
+  static Info Infos[] = {
 #define CUSTOM_BUILTIN_MAPPING(x,s) \
   { Hexagon::BI__builtin_HEXAGON_##x, Intrinsic::hexagon_##x, s },
     CUSTOM_BUILTIN_MAPPING(L2_loadrub_pci, 0)


        


More information about the cfe-commits mailing list