-Init *StringRecTy::convertValue(UnOpInit *UO) {
- if (UO->getOpcode() == UnOpInit::CAST) {
- Init *L = UO->getOperand()->convertInitializerTo(this);
- if (!L) return nullptr;
- if (L != UO->getOperand())
- return UnOpInit::get(UnOpInit::CAST, L, StringRecTy::get());
- return UO;
- }
-
- return convertValue((TypedInit*)UO);
-}
-
-Init *StringRecTy::convertValue(BinOpInit *BO) {
- if (BO->getOpcode() == BinOpInit::STRCONCAT) {
- Init *L = BO->getLHS()->convertInitializerTo(this);
- Init *R = BO->getRHS()->convertInitializerTo(this);
- if (!L || !R) return nullptr;
- if (L != BO->getLHS() || R != BO->getRHS())
- return BinOpInit::get(BinOpInit::STRCONCAT, L, R, StringRecTy::get());
- return BO;
- }
-
- return convertValue((TypedInit*)BO);
-}
-