@@ -29,7 +29,7 @@ static std::string getPackageFullName(const Record *R, StringRef Sep = ".");
29
29
static std::string getParentPackageFullName (const Record *R,
30
30
StringRef Sep = " ." ) {
31
31
std::string name;
32
- if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit (" ParentPackage" )))
32
+ if (const DefInit *DI = dyn_cast<DefInit>(R->getValueInit (" ParentPackage" )))
33
33
name = getPackageFullName (DI->getDef (), Sep);
34
34
return name;
35
35
}
@@ -53,7 +53,7 @@ static std::string getCheckerFullName(const Record *R, StringRef Sep = ".") {
53
53
}
54
54
55
55
static std::string getStringValue (const Record &R, StringRef field) {
56
- if (StringInit *SI = dyn_cast<StringInit>(R.getValueInit (field)))
56
+ if (const StringInit *SI = dyn_cast<StringInit>(R.getValueInit (field)))
57
57
return std::string (SI->getValue ());
58
58
return std::string ();
59
59
}
@@ -94,7 +94,7 @@ static std::string getCheckerDocs(const Record &R) {
94
94
// / the class itself has to be modified for adding a new option type in
95
95
// / CheckerBase.td.
96
96
static std::string getCheckerOptionType (const Record &R) {
97
- if (BitsInit *BI = R.getValueAsBitsInit (" Type" )) {
97
+ if (const BitsInit *BI = R.getValueAsBitsInit (" Type" )) {
98
98
switch (getValueFromBitsInit (BI, R)) {
99
99
case 0 :
100
100
return " int" ;
@@ -111,7 +111,7 @@ static std::string getCheckerOptionType(const Record &R) {
111
111
}
112
112
113
113
static std::string getDevelopmentStage (const Record &R) {
114
- if (BitsInit *BI = R.getValueAsBitsInit (" DevelopmentStage" )) {
114
+ if (const BitsInit *BI = R.getValueAsBitsInit (" DevelopmentStage" )) {
115
115
switch (getValueFromBitsInit (BI, R)) {
116
116
case 0 :
117
117
return " alpha" ;
@@ -131,7 +131,7 @@ static bool isHidden(const Record *R) {
131
131
return true ;
132
132
133
133
// Not declared as hidden, check the parent package if it is hidden.
134
- if (DefInit *DI = dyn_cast<DefInit>(R->getValueInit (" ParentPackage" )))
134
+ if (const DefInit *DI = dyn_cast<DefInit>(R->getValueInit (" ParentPackage" )))
135
135
return isHidden (DI->getDef ());
136
136
137
137
return false ;
0 commit comments