MCPcopy Create free account
hub / github.com/beefytech/Beef / HasStringId

Method HasStringId

IDEHelper/Compiler/BfModule.cpp:1776–1797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1774}
1775
1776bool 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
1799int BfModule::GetStringPoolIdx(BfIRValue constantStr, BfIRConstHolder* constHolder)
1800{

Callers 1

ResolveMethod · 0.80

Calls 2

GetConstantByIdMethod · 0.80
GetConstantMethod · 0.45

Tested by

no test coverage detected