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

Method Hash

IDEHelper/Backend/BeModule.cpp:1834–1873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1832}
1833
1834void BeModule::Hash(BeHashContext& hashCtx)
1835{
1836 hashCtx.MixinStr(mTargetTriple);
1837 hashCtx.MixinStr(mTargetCPU);
1838
1839 hashCtx.Mixin(mConfigConsts64.size());
1840 for (auto configConst : mConfigConsts64)
1841 configConst->HashContent(hashCtx);
1842
1843 if (mDbgModule != NULL)
1844 mDbgModule->HashReference(hashCtx);
1845
1846 if (!mFunctions.IsEmpty())
1847 {
1848 std::sort(mFunctions.begin(), mFunctions.end(), [](BeFunction* lhs, BeFunction* rhs)
1849 {
1850 return (lhs->mName < rhs->mName);
1851 });
1852
1853 for (auto& beFunction : mFunctions)
1854 {
1855 if (!beFunction->mBlocks.IsEmpty())
1856 beFunction->HashReference(hashCtx);
1857 }
1858 }
1859
1860 if (!mGlobalVariables.IsEmpty())
1861 {
1862 std::sort(mGlobalVariables.begin(), mGlobalVariables.end(), [](BeGlobalVariable* lhs, BeGlobalVariable* rhs)
1863 {
1864 return (lhs->mName < rhs->mName);
1865 });
1866
1867 for (auto& beGlobalVar : mGlobalVariables)
1868 {
1869 if (beGlobalVar->mInitializer != NULL)
1870 beGlobalVar->HashReference(hashCtx);
1871 }
1872 }
1873}
1874
1875#define DELETE_ENTRY(i) delete mOwnedValues[i]; mOwnedValues[i] = NULL
1876

Callers

nothing calls this directly

Calls 8

MixinStrMethod · 0.80
HashReferenceMethod · 0.80
MixinMethod · 0.45
sizeMethod · 0.45
HashContentMethod · 0.45
IsEmptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected