| 1832 | } |
| 1833 | |
| 1834 | void 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 |
nothing calls this directly
no test coverage detected