| 1774 | } |
| 1775 | |
| 1776 | bool BfModule::HasStringId(BfIRValue constantStr, BfIRConstHolder* constHolder) |
| 1777 | { |
| 1778 | if (constHolder == NULL) |
| 1779 | constHolder = mBfIRBuilder; |
| 1780 | |
| 1781 | auto constant = constHolder->GetConstant(constantStr); |
| 1782 | if (constant == NULL) |
| 1783 | return false; |
| 1784 | |
| 1785 | while (constant->mConstType == BfConstType_BitCast) |
| 1786 | { |
| 1787 | auto constBitCast = (BfConstantBitCast*)constant; |
| 1788 | constant = constHolder->GetConstantById(constBitCast->mTarget); |
| 1789 | } |
| 1790 | |
| 1791 | if (constant->mTypeCode == BfTypeCode_StringId) |
| 1792 | { |
| 1793 | return true; |
| 1794 | } |
| 1795 | |
| 1796 | return false; |
| 1797 | } |
| 1798 | |
| 1799 | int BfModule::GetStringPoolIdx(BfIRValue constantStr, BfIRConstHolder* constHolder) |
| 1800 | { |
no test coverage detected