Lines Matching defs:WS

468     const auto &WS = static_cast<const MCSymbolWasm &>(S);
469 if (WS.isDefined() && WS.isFunction() && !WS.isVariable()) {
1331 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1332 if (WS.isData() && WS.isInSection()) {
1333 auto &RefSection = static_cast<MCSectionWasm &>(WS.getSection());
1360 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1364 if (WS.isFunction()) {
1372 if (WS.isTag())
1373 registerTagType(WS);
1375 if (WS.isTemporary())
1379 if (!WS.isDefined() && !WS.isComdat()) {
1380 if (WS.isFunction()) {
1382 Import.Module = WS.getImportModule();
1383 Import.Field = WS.getImportName();
1385 Import.SigIndex = getFunctionType(WS);
1387 assert(WasmIndices.count(&WS) == 0);
1388 WasmIndices[&WS] = NumFunctionImports++;
1389 } else if (WS.isGlobal()) {
1390 if (WS.isWeak())
1394 Import.Field = WS.getImportName();
1396 Import.Module = WS.getImportModule();
1397 Import.Global = WS.getGlobalType();
1399 assert(WasmIndices.count(&WS) == 0);
1400 WasmIndices[&WS] = NumGlobalImports++;
1401 } else if (WS.isTag()) {
1402 if (WS.isWeak())
1406 Import.Module = WS.getImportModule();
1407 Import.Field = WS.getImportName();
1409 Import.SigIndex = getTagType(WS);
1411 assert(WasmIndices.count(&WS) == 0);
1412 WasmIndices[&WS] = NumTagImports++;
1413 } else if (WS.isTable()) {
1414 if (WS.isWeak())
1418 Import.Module = WS.getImportModule();
1419 Import.Field = WS.getImportName();
1421 Import.Table = WS.getTableType();
1423 assert(WasmIndices.count(&WS) == 0);
1424 WasmIndices[&WS] = NumTableImports++;
1431 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1432 if (WS.isUsedInGOT()) {
1434 if (WS.isFunction())
1438 Import.Field = WS.getName();
1442 assert(GOTIndices.count(&WS) == 0);
1443 GOTIndices[&WS] = NumGlobalImports++;
1578 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1581 << toString(WS.getType().value_or(wasm::WASM_SYMBOL_TYPE_DATA))
1585 << " isWeak=" << WS.isWeak() << " isHidden=" << WS.isHidden()
1586 << " isVariable=" << WS.isVariable() << "\n");
1588 if (WS.isVariable())
1590 if (WS.isComdat() && !WS.isDefined())
1593 if (WS.isFunction()) {
1595 if (WS.isDefined()) {
1596 if (WS.getOffset() != 0)
1603 Func.SigIndex = getFunctionType(WS);
1604 Func.Section = &WS.getSection();
1605 assert(WasmIndices.count(&WS) == 0);
1606 WasmIndices[&WS] = Index;
1609 auto &Section = static_cast<MCSectionWasm &>(WS.getSection());
1615 if (WS.hasExportName()) {
1617 Export.Name = WS.getExportName();
1624 Index = WasmIndices.find(&WS)->second;
1629 } else if (WS.isData()) {
1630 if (!isInSymtab(WS))
1633 if (!WS.isDefined()) {
1639 if (!WS.getSize())
1641 WS.getName());
1644 if (!WS.getSize()->evaluateAsAbsolute(Size, Asm))
1647 auto &DataSection = static_cast<MCSectionWasm &>(WS.getSection());
1650 WS.getName());
1655 DataSection.getSegmentIndex(), Asm.getSymbolOffset(WS),
1657 assert(DataLocations.count(&WS) == 0);
1658 DataLocations[&WS] = Ref;
1661 } else if (WS.isGlobal()) {
1663 if (WS.isDefined()) {
1665 Global.Type = WS.getGlobalType();
1687 assert(WasmIndices.count(&WS) == 0);
1688 WasmIndices[&WS] = Global.Index;
1693 << WasmIndices.find(&WS)->second << "\n");
1695 } else if (WS.isTable()) {
1696 if (WS.isDefined()) {
1699 Table.Type = WS.getTableType();
1700 assert(WasmIndices.count(&WS) == 0);
1701 WasmIndices[&WS] = Table.Index;
1705 << WasmIndices.find(&WS)->second << "\n");
1706 } else if (WS.isTag()) {
1710 if (WS.isDefined()) {
1712 uint32_t SigIndex = getTagType(WS);
1713 assert(WasmIndices.count(&WS) == 0);
1714 WasmIndices[&WS] = Index;
1718 assert(WasmIndices.count(&WS) > 0);
1720 LLVM_DEBUG(dbgs() << " -> tag index: " << WasmIndices.find(&WS)->second
1724 assert(WS.isSection());
1745 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1746 LLVM_DEBUG(dbgs() << WS.getName() << ": weak alias of '" << *Base
1752 assert(WasmIndices.count(&WS) == 0);
1753 WasmIndices[&WS] = WasmIndex;
1756 auto &DataSection = static_cast<MCSectionWasm &>(WS.getSection());
1773 DataLocations[&WS] = Ref;
1783 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1784 if (!isInSymtab(WS)) {
1785 WS.setIndex(InvalidIndex);
1788 LLVM_DEBUG(dbgs() << "adding to symtab: " << WS << "\n");
1791 if (WS.isWeak())
1793 if (WS.isHidden())
1795 if (!WS.isExternal() && WS.isDefined())
1797 if (WS.isUndefined())
1799 if (WS.isNoStrip()) {
1805 if (WS.hasImportName())
1807 if (WS.hasExportName())
1809 if (WS.isTLS())
1813 Info.Name = WS.getName();
1814 Info.Kind = WS.getType().value_or(wasm::WASM_SYMBOL_TYPE_DATA);
1816 if (!WS.isData()) {
1817 assert(WasmIndices.count(&WS) > 0);
1818 Info.ElementIndex = WasmIndices.find(&WS)->second;
1819 } else if (WS.isDefined()) {
1820 assert(DataLocations.count(&WS) > 0);
1821 Info.DataRef = DataLocations.find(&WS)->second;
1823 WS.setIndex(SymbolInfos.size());
1860 const auto &WS = static_cast<const MCSectionWasm &>(S);
1861 if (WS.getName().starts_with(".fini_array"))
1863 if (!WS.getName().starts_with(".init_array"))
1865 auto IT = WS.begin();
1866 if (IT == WS.end())
1889 if (WS.getName().size() > PrefixLength) {
1890 if (WS.getName()[PrefixLength] != '.')
1893 if (WS.getName().substr(PrefixLength + 1).getAsInteger(10, Priority))