Lines Matching refs:WS

468     const auto &WS = static_cast<const MCSymbolWasm &>(S);
469 if (WS.isDefined() && WS.isFunction() && !WS.isVariable()) {
1333 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1334 if (WS.isData() && WS.isInSection()) {
1335 auto &RefSection = static_cast<MCSectionWasm &>(WS.getSection());
1362 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1366 if (WS.isFunction()) {
1374 if (WS.isTag())
1375 registerTagType(WS);
1377 if (WS.isTemporary())
1381 if (!WS.isDefined() && !WS.isComdat()) {
1382 if (WS.isFunction()) {
1384 Import.Module = WS.getImportModule();
1385 Import.Field = WS.getImportName();
1387 Import.SigIndex = getFunctionType(WS);
1389 assert(WasmIndices.count(&WS) == 0);
1390 WasmIndices[&WS] = NumFunctionImports++;
1391 } else if (WS.isGlobal()) {
1392 if (WS.isWeak())
1396 Import.Field = WS.getImportName();
1398 Import.Module = WS.getImportModule();
1399 Import.Global = WS.getGlobalType();
1401 assert(WasmIndices.count(&WS) == 0);
1402 WasmIndices[&WS] = NumGlobalImports++;
1403 } else if (WS.isTag()) {
1404 if (WS.isWeak())
1408 Import.Module = WS.getImportModule();
1409 Import.Field = WS.getImportName();
1411 Import.SigIndex = getTagType(WS);
1413 assert(WasmIndices.count(&WS) == 0);
1414 WasmIndices[&WS] = NumTagImports++;
1415 } else if (WS.isTable()) {
1416 if (WS.isWeak())
1420 Import.Module = WS.getImportModule();
1421 Import.Field = WS.getImportName();
1423 Import.Table = WS.getTableType();
1425 assert(WasmIndices.count(&WS) == 0);
1426 WasmIndices[&WS] = NumTableImports++;
1433 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1434 if (WS.isUsedInGOT()) {
1436 if (WS.isFunction())
1440 Import.Field = WS.getName();
1444 assert(GOTIndices.count(&WS) == 0);
1445 GOTIndices[&WS] = NumGlobalImports++;
1580 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1583 << toString(WS.getType().value_or(wasm::WASM_SYMBOL_TYPE_DATA))
1587 << " isWeak=" << WS.isWeak() << " isHidden=" << WS.isHidden()
1588 << " isVariable=" << WS.isVariable() << "\n");
1590 if (WS.isVariable())
1592 if (WS.isComdat() && !WS.isDefined())
1595 if (WS.isFunction()) {
1597 if (WS.isDefined()) {
1598 if (WS.getOffset() != 0)
1605 Func.SigIndex = getFunctionType(WS);
1606 Func.Section = &WS.getSection();
1607 assert(WasmIndices.count(&WS) == 0);
1608 WasmIndices[&WS] = Index;
1611 auto &Section = static_cast<MCSectionWasm &>(WS.getSection());
1617 if (WS.hasExportName()) {
1619 Export.Name = WS.getExportName();
1626 Index = WasmIndices.find(&WS)->second;
1631 } else if (WS.isData()) {
1632 if (!isInSymtab(WS))
1635 if (!WS.isDefined()) {
1641 if (!WS.getSize())
1643 WS.getName());
1646 if (!WS.getSize()->evaluateAsAbsolute(Size, Asm))
1649 auto &DataSection = static_cast<MCSectionWasm &>(WS.getSection());
1652 WS.getName());
1657 DataSection.getSegmentIndex(), Asm.getSymbolOffset(WS),
1659 assert(DataLocations.count(&WS) == 0);
1660 DataLocations[&WS] = Ref;
1663 } else if (WS.isGlobal()) {
1665 if (WS.isDefined()) {
1667 Global.Type = WS.getGlobalType();
1689 assert(WasmIndices.count(&WS) == 0);
1690 WasmIndices[&WS] = Global.Index;
1695 << WasmIndices.find(&WS)->second << "\n");
1697 } else if (WS.isTable()) {
1698 if (WS.isDefined()) {
1701 Table.Type = WS.getTableType();
1702 assert(WasmIndices.count(&WS) == 0);
1703 WasmIndices[&WS] = Table.Index;
1707 << WasmIndices.find(&WS)->second << "\n");
1708 } else if (WS.isTag()) {
1712 if (WS.isDefined()) {
1714 uint32_t SigIndex = getTagType(WS);
1715 assert(WasmIndices.count(&WS) == 0);
1716 WasmIndices[&WS] = Index;
1720 assert(WasmIndices.count(&WS) > 0);
1722 LLVM_DEBUG(dbgs() << " -> tag index: " << WasmIndices.find(&WS)->second
1726 assert(WS.isSection());
1747 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1748 LLVM_DEBUG(dbgs() << WS.getName() << ": weak alias of '" << *Base
1754 assert(WasmIndices.count(&WS) == 0);
1755 WasmIndices[&WS] = WasmIndex;
1758 auto &DataSection = static_cast<MCSectionWasm &>(WS.getSection());
1775 DataLocations[&WS] = Ref;
1785 const auto &WS = static_cast<const MCSymbolWasm &>(S);
1786 if (!isInSymtab(WS)) {
1787 WS.setIndex(InvalidIndex);
1790 LLVM_DEBUG(dbgs() << "adding to symtab: " << WS << "\n");
1793 if (WS.isWeak())
1795 if (WS.isHidden())
1797 if (!WS.isExternal() && WS.isDefined())
1799 if (WS.isUndefined())
1801 if (WS.isNoStrip()) {
1807 if (WS.hasImportName())
1809 if (WS.hasExportName())
1811 if (WS.isTLS())
1815 Info.Name = WS.getName();
1816 Info.Kind = WS.getType().value_or(wasm::WASM_SYMBOL_TYPE_DATA);
1818 if (!WS.isData()) {
1819 assert(WasmIndices.count(&WS) > 0);
1820 Info.ElementIndex = WasmIndices.find(&WS)->second;
1821 } else if (WS.isDefined()) {
1822 assert(DataLocations.count(&WS) > 0);
1823 Info.DataRef = DataLocations.find(&WS)->second;
1825 WS.setIndex(SymbolInfos.size());
1862 const auto &WS = static_cast<const MCSectionWasm &>(S);
1863 if (WS.getName().starts_with(".fini_array"))
1865 if (!WS.getName().starts_with(".init_array"))
1867 auto IT = WS.begin();
1868 if (IT == WS.end())
1891 if (WS.getName().size() > PrefixLength) {
1892 if (WS.getName()[PrefixLength] != '.')
1895 if (WS.getName().substr(PrefixLength + 1).getAsInteger(10, Priority))