| 1858 | } |
| 1859 | |
| 1860 | BfIRValue BfModule::GetStringCharPtr(int stringId, bool force) |
| 1861 | { |
| 1862 | if ((mBfIRBuilder->mIgnoreWrites) && (!force)) |
| 1863 | { |
| 1864 | mUnreifiedStringPoolRefs.Add(stringId); |
| 1865 | return mBfIRBuilder->CreateConst(BfTypeCode_StringId, stringId); |
| 1866 | } |
| 1867 | |
| 1868 | BfIRValue* irValue = NULL; |
| 1869 | if (!mStringCharPtrPool.TryAdd(stringId, NULL, &irValue)) |
| 1870 | return *irValue; |
| 1871 | |
| 1872 | // If this wasn't in neither dictionary yet, add to mStringPoolRefs |
| 1873 | if (!mStringObjectPool.ContainsKey(stringId)) |
| 1874 | mStringPoolRefs.Add(stringId); |
| 1875 | |
| 1876 | const StringImpl& str = mContext->mStringObjectIdMap[stringId].mString; |
| 1877 | BfIRValue strCharPtrConst = CreateStringCharPtr(str, stringId, false); |
| 1878 | *irValue = strCharPtrConst; |
| 1879 | return strCharPtrConst; |
| 1880 | } |
| 1881 | |
| 1882 | BfIRValue BfModule::GetStringCharPtr(BfIRValue strValue, bool force) |
| 1883 | { |
no test coverage detected