1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef CPP_ABCKIT_HASH_SPECIALIZATIONS_H 17 #define CPP_ABCKIT_HASH_SPECIALIZATIONS_H 18 19 #include "config.h" 20 21 #include "basic_block.h" 22 #include "instruction.h" 23 #include "literal.h" 24 #include "literal_array.h" 25 26 #include "core/annotation_element.h" 27 #include "core/annotation_interface_field.h" 28 #include "core/annotation_interface.h" 29 #include "core/annotation.h" 30 #include "core/class.h" 31 #include "core/export_descriptor.h" 32 #include "core/function.h" 33 #include "core/import_descriptor.h" 34 #include "core/module.h" 35 #include "core/namespace.h" 36 37 #include "arkts/annotation_element.h" 38 #include "arkts/annotation_interface_field.h" 39 #include "arkts/annotation_interface.h" 40 #include "arkts/annotation.h" 41 #include "arkts/class.h" 42 #include "arkts/export_descriptor.h" 43 #include "arkts/function.h" 44 #include "arkts/import_descriptor.h" 45 #include "arkts/module.h" 46 #include "arkts/namespace.h" 47 48 // NOLINTNEXTLINE(cert-dcl58-cpp) 49 namespace std { 50 51 template <> 52 struct hash<abckit::BasicBlock> : public abckit::DefaultHash<abckit::BasicBlock> { 53 }; 54 55 template <> 56 struct hash<abckit::Instruction> : public abckit::DefaultHash<abckit::Instruction> { 57 }; 58 59 template <> 60 struct hash<abckit::Literal> : public abckit::DefaultHash<abckit::Literal> { 61 }; 62 63 template <> 64 struct hash<abckit::LiteralArray> : public abckit::DefaultHash<abckit::LiteralArray> { 65 }; 66 67 template <> 68 struct hash<abckit::core::AnnotationElement> : public abckit::DefaultHash<abckit::core::AnnotationElement> { 69 }; 70 71 template <> 72 struct hash<abckit::core::AnnotationInterfaceField> 73 : public abckit::DefaultHash<abckit::core::AnnotationInterfaceField> { 74 }; 75 76 template <> 77 struct hash<abckit::core::AnnotationInterface> : public abckit::DefaultHash<abckit::core::AnnotationInterface> { 78 }; 79 80 template <> 81 struct hash<abckit::core::Annotation> : public abckit::DefaultHash<abckit::core::Annotation> { 82 }; 83 84 template <> 85 struct hash<abckit::core::Class> : public abckit::DefaultHash<abckit::core::Class> { 86 }; 87 88 template <> 89 struct hash<abckit::core::ExportDescriptor> : public abckit::DefaultHash<abckit::core::ExportDescriptor> { 90 }; 91 92 template <> 93 struct hash<abckit::core::Function> : public abckit::DefaultHash<abckit::core::Function> { 94 }; 95 96 template <> 97 struct hash<abckit::core::ImportDescriptor> : public abckit::DefaultHash<abckit::core::ImportDescriptor> { 98 }; 99 100 template <> 101 struct hash<abckit::core::Module> : public abckit::DefaultHash<abckit::core::Module> { 102 }; 103 104 template <> 105 struct hash<abckit::core::Namespace> : public abckit::DefaultHash<abckit::core::Namespace> { 106 }; 107 108 template <> 109 struct hash<abckit::arkts::AnnotationElement> : public abckit::DefaultHash<abckit::arkts::AnnotationElement> { 110 }; 111 112 template <> 113 struct hash<abckit::arkts::AnnotationInterfaceField> 114 : public abckit::DefaultHash<abckit::arkts::AnnotationInterfaceField> { 115 }; 116 117 template <> 118 struct hash<abckit::arkts::AnnotationInterface> : public abckit::DefaultHash<abckit::arkts::AnnotationInterface> { 119 }; 120 121 template <> 122 struct hash<abckit::arkts::Annotation> : public abckit::DefaultHash<abckit::arkts::Annotation> { 123 }; 124 125 template <> 126 struct hash<abckit::arkts::Class> : public abckit::DefaultHash<abckit::arkts::Class> { 127 }; 128 129 template <> 130 struct hash<abckit::arkts::ExportDescriptor> : public abckit::DefaultHash<abckit::arkts::ExportDescriptor> { 131 }; 132 133 template <> 134 struct hash<abckit::arkts::Function> : public abckit::DefaultHash<abckit::arkts::Function> { 135 }; 136 137 template <> 138 struct hash<abckit::arkts::ImportDescriptor> : public abckit::DefaultHash<abckit::arkts::ImportDescriptor> { 139 }; 140 141 template <> 142 struct hash<abckit::arkts::Module> : public abckit::DefaultHash<abckit::arkts::Module> { 143 }; 144 145 template <> 146 struct hash<abckit::arkts::Namespace> : public abckit::DefaultHash<abckit::arkts::Namespace> { 147 }; 148 149 } // namespace std 150 151 #endif // CPP_ABCKIT_HASH_SPECIALIZATIONS_H 152