MCPcopy Create free account
hub / github.com/HexHive/NASS / initVarTypeMap

Function initVarTypeMap

fans/fuzzer-engine/fuzzer/src/types/types.cpp:5–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3map<string, VarType> varTypeMap;
4
5void initVarTypeMap() {
6
7 varTypeMap["IntegerLiteral"] = INTEGER_LITERAL;
8 // int8
9 varTypeMap["char"] = INT8_TYPE;
10 varTypeMap["unsigned char"] = UINT8_TYPE;
11 // int16
12 varTypeMap["short"] = INT16_TYPE;
13 varTypeMap["unsigned short"] = UINT16_TYPE;
14 // int32
15 varTypeMap["int"] = INT32_TYPE;
16 varTypeMap["int32_t"] = INT32_TYPE;
17 varTypeMap["::android::status_t"] = INT32_TYPE;
18
19 // uint32
20 varTypeMap["uint32_t"] = UINT32_TYPE;
21 varTypeMap["unsigned int"] = UINT32_TYPE;
22
23 // int64
24 varTypeMap["const int64_t"] = INT64_TYPE;
25 varTypeMap["int64_t"] = INT64_TYPE;
26 varTypeMap["long"] = INT64_TYPE;
27 varTypeMap["long long"] = INT64_TYPE;
28
29 // uint64
30 varTypeMap["uint64_t"] = UINT64_TYPE;
31 varTypeMap["unsigned long"] = UINT64_TYPE;
32 varTypeMap["unsigned long long"] = UINT64_TYPE;
33
34 // float
35 varTypeMap["float"] = FLOAT_TYPE;
36 varTypeMap["FloatingLiteral"] = FLOAT_TYPE;
37 varTypeMap["class android::half"] = FLOAT_TYPE;
38
39 // double
40 varTypeMap["double"] = DOUBLE_TYPE;
41
42 // STRING16
43 varTypeMap["android::String16"] = STRING16_TYPE;
44 varTypeMap["class android::String16"] = STRING16_TYPE;
45 // here we consider the following types as String16.
46 varTypeMap["char16_t *"] = STRING16_TYPE;
47
48 // STRING8
49 varTypeMap["android::String8"] = STRING8_TYPE;
50 varTypeMap["class android::String8"] = STRING8_TYPE;
51 varTypeMap["const class android::String8"] = STRING8_TYPE;
52
53 // STRING
54 varTypeMap["string"] = CSTRING_TYPE;
55 varTypeMap["std::string"] = CSTRING_TYPE;
56
57 // when dealing with variable of these types, we consider the type of them as
58 // CSTRING.
59 varTypeMap["char *"] = CSTRING_TYPE;
60 varTypeMap["const char *"] = CSTRING_TYPE;
61 varTypeMap["unsigned char *"] = CSTRING_TYPE;
62

Callers 1

initFunction · 0.50

Calls 5

lengthMethod · 0.80
findMethod · 0.45
c_strMethod · 0.45
countMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected