File tree 1 file changed +9
-3
lines changed
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
6
6
* You may obtain a copy of the License at
7
- *
7
+ *
8
8
* http://www.apache.org/licenses/LICENSE-2.0
9
- *
9
+ *
10
10
* Unless required by applicable law or agreed to in writing, software
11
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -81,10 +81,16 @@ public String toString() {
81
81
/**
82
82
* Returns the GenericCallingConvention corresponding to the specified
83
83
* type string or unknown if name is not defined.
84
- * @param callingConvention calling convention declaration name (e.g., "__stdcall")
84
+ * @param callingConvention calling convention declaration name (e.g., "__stdcall").
85
+ * Enum name is also allowed for backward compatibility.
85
86
* @return GenericCallingConvention or {@link #unknown} if not found.
86
87
*/
87
88
public static GenericCallingConvention getGenericCallingConvention (String callingConvention ) {
89
+ for (GenericCallingConvention value : GenericCallingConvention .values ()) {
90
+ if (value .getDeclarationName ().equalsIgnoreCase (callingConvention )) {
91
+ return value ;
92
+ }
93
+ }
88
94
for (GenericCallingConvention value : GenericCallingConvention .values ()) {
89
95
if (value .name ().equalsIgnoreCase (callingConvention )) {
90
96
return value ;
You can’t perform that action at this time.
0 commit comments