LLVM: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

49

50using namespace llvm;

51

52#define DEBUG_TYPE "asm-printer"

53

55

56

57

58

59

63 for (MVT T : {MVT::i32, MVT::i64, MVT::f32, MVT::f64, MVT::v16i8, MVT::v8i16,

64 MVT::v4i32, MVT::v2i64, MVT::v4f32, MVT::v2f64, MVT::v8f16})

65 if (TRI->isTypeLegalForClass(*TRC, T))

66 return T;

67 LLVM_DEBUG(errs() << "Unknown type for register number: " << RegNo);

69 return MVT::Other;

70}

71

75 "Unlowered physical register encountered during assembly printing");

77 unsigned WAReg = MFI->getWAReg(RegNo);

79 return '$' + utostr(WAReg);

80}

81

85}

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

104 if (Name.front() == '"' && Name.back() == '"')

106 return Name.starts_with("__invoke_");

107}

108

109

110

112 switch (VT) {

114 return 'i';

116 return 'j';

118 return 'f';

120 return 'd';

122 return 'V';

124 return 'F';

126 return 'X';

128 return 'E';

129 default:

131 }

132}

133

134

135

138 std::string Ret = "invoke_";

140 for (auto VT : Sig->Returns)

142 else

143 Ret += 'v';

144

145 for (unsigned I = 1, E = Sig->Params.size(); I < E; I++)

147 return Ret;

148}

149

150

151

152

153

156 bool &InvokeDetected) {

160 InvokeDetected = true;

162 std::string Msg =

163 "Emscripten EH/SjLj does not support multivalue returns: " +

164 std::string(F->getName()) + ": " +

167 }

168 WasmSym = cast(

170 } else {

171 WasmSym = cast(getSymbol(F));

172 }

173 return WasmSym;

174}

175

179 return;

180 }

181

183

185

186 if (Sym->getType()) {

189 if (Subtarget) {

190

191

192

193

194

198 }

200 }

201

208

209

211 }

212}

213

216

217

218 if (WasmSym->getType())

219 return WasmSym;

220

222

223

224

225

226

227 if (Name == "__stack_pointer" || Name == "__tls_base" ||

228 Name == "__memory_base" || Name == "__table_base" ||

229 Name == "__tls_size" || Name == "__tls_align") {

230 bool Mutable =

231 Name == "__stack_pointer" || Name == "__tls_base";

236 Mutable});

237 return WasmSym;

238 }

239

240 if (Name.starts_with("GCC_except_table")) {

242 return WasmSym;

243 }

244

247 if (Name == "__cpp_exception" || Name == "__c_longjmp") {

249

250

251

252

253

255 WasmSym->setWeak(true);

256 WasmSym->setExternal(true);

257

258

259

260

261

262

266 } else {

269 }

271 Signature->Returns = std::move(Returns);

272 Signature->Params = std::move(Params);

273 WasmSym->setSignature(Signature);

274

275 return WasmSym;

276}

277

279 std::optionalwasm::WasmSymbolType WasmTy = Sym->getType();

280 if (!WasmTy)

281 return;

282

283 switch (*WasmTy) {

286 break;

289 break;

292 break;

293 default:

294 break;

295 }

296}

297

299 if (signaturesEmitted)

300 return;

301 signaturesEmitted = true;

302

303

304

305

306

310 if (WasmSym->isFunction()) {

311

312

314 }

315 }

316

318

319

320

321 auto Sym = cast_or_null(It.getValue().Symbol);

322 if (Sym && Sym->isDefined())

324 }

325

327 for (const auto &F : M) {

328 if (F.isIntrinsic())

329 continue;

330

331

332

333

334

338

339

340

341

343 bool InvokeDetected = false;

346 Signature, InvokeDetected);

347

348

349

350

351

352 if (InvokeDetected && !InvokeSymbols.insert(Sym).second)

353 continue;

354

356 if (Sym->getSignature()) {

357 Sym->setSignature(Signature);

358 }

359

361

362 if (F.hasFnAttribute("wasm-import-module")) {

364 F.getFnAttribute("wasm-import-module").getValueAsString();

367 }

368 if (F.hasFnAttribute("wasm-import-name")) {

369

370

372 InvokeDetected

373 ? Sym->getName()

374 : F.getFnAttribute("wasm-import-name").getValueAsString();

377 }

378

379 if (F.hasFnAttribute("wasm-export-name")) {

381 StringRef Name = F.getFnAttribute("wasm-export-name").getValueAsString();

384 }

385 }

386}

387

389

390

391

393

394

395

396

397

398

399

400 for (const auto &F : M) {

401 if (F.isIntrinsic() && F.hasAddressTaken()) {

405 break;

406 }

407 }

408

409 for (const auto &G : M.globals()) {

410 if (G.hasInitializer() && G.hasExternalLinkage() &&

412 G.getValueType()->isSized()) {

413 uint16_t Size = M.getDataLayout().getTypeAllocSize(G.getValueType());

416 }

417 }

418

419 if (const NamedMDNode *Named = M.getNamedMetadata("wasm.custom_sections")) {

420 for (const Metadata *MD : Named->operands()) {

421 const auto *Tuple = dyn_cast(MD);

422 if (!Tuple || Tuple->getNumOperands() != 2)

423 continue;

424 const MDString *Name = dyn_cast(Tuple->getOperand(0));

425 const MDString *Contents = dyn_cast(Tuple->getOperand(1));

426 if (Name || !Contents)

427 continue;

428

430 std::string SectionName = (".custom_section." + Name->getString()).str();

436 }

437 }

438

442}

443

446 if (const NamedMDNode *Debug = M.getNamedMetadata("llvm.dbg.cu")) {

448 for (size_t I = 0, E = Debug->getNumOperands(); I < E; ++I) {

449 const auto *CU = cast(Debug->getOperand(I));

451 Language.consume_front("DW_LANG_");

452 if (SeenLanguages.insert(Language).second)

454 }

455 }

456

458 if (const NamedMDNode *Ident = M.getNamedMetadata("llvm.ident")) {

460 for (size_t I = 0, E = Ident->getNumOperands(); I < E; ++I) {

461 const auto *S = cast(Ident->getOperand(I)->getOperand(0));

462 std::pair<StringRef, StringRef> Field = S->getString().split("version");

467 }

468 }

469

470 int FieldCount = int(!Languages.empty()) + int(!Tools.empty());

471 if (FieldCount != 0) {

476 OutStreamer->emitULEB128IntValue(FieldCount);

477 for (auto &Producers : {std::make_pair("language", &Languages),

478 std::make_pair("processed-by", &Tools)}) {

479 if (Producers.second->empty())

480 continue;

481 OutStreamer->emitULEB128IntValue(strlen(Producers.first));

483 OutStreamer->emitULEB128IntValue(Producers.second->size());

484 for (auto &Producer : *Producers.second) {

485 OutStreamer->emitULEB128IntValue(Producer.first.size());

487 OutStreamer->emitULEB128IntValue(Producer.second.size());

489 }

490 }

492 }

493}

494

496 struct FeatureEntry {

498 std::string Name;

499 };

500

501

503 auto EmitFeature = [&](std::string Feature) {

504 std::string MDKey = (StringRef("wasm-feature-") + Feature).str();

505 Metadata *Policy = M.getModuleFlag(MDKey);

506 if (Policy == nullptr)

507 return;

508

509 FeatureEntry Entry;

510 Entry.Prefix = 0;

511 Entry.Name = Feature;

512

513 if (auto *MD = cast(Policy))

514 if (auto *I = cast(MD->getValue()))

515 Entry.Prefix = I->getZExtValue();

516

517

520 return;

521

522 EmittedFeatures.push_back(Entry);

523 };

524

526 EmitFeature(KV.Key);

527 }

528

529 EmitFeature("shared-mem");

530

531

532

533

534 if (M.getDataLayout().getPointerSize() == 8) {

535

536

538 }

539

540 if (EmittedFeatures.size() == 0)

541 return;

542

543

547 OutStreamer->switchSection(FeaturesSection);

548

549 OutStreamer->emitULEB128IntValue(EmittedFeatures.size());

550 for (auto &F : EmittedFeatures) {

552 OutStreamer->emitULEB128IntValue(F.Name.size());

554 }

555

557}

558

560 auto V = M.getNamedGlobal("llvm.global.annotations");

561 if (!V)

562 return;

563

564

566 const ConstantArray *CA = cast(V->getOperand(0));

568 auto *CS = cast(Op);

569

571

572 if (!isa(AnnotatedVar))

573 continue;

574 auto *F = cast(AnnotatedVar);

575

576

577 auto *GV = cast(CS->getOperand(1)->stripPointerCasts());

581 CustomSections[AnnotationString].push_back(Sym);

582 }

583

584

585 for (const auto &[Name, Symbols] : CustomSections) {

589 OutStreamer->switchSection(CustomSection);

590

591 for (auto &Sym : Symbols) {

595 4);

596 }

598 }

599}

600

604 "WebAssembly disables constant pools");

605}

606

608

609}

610

616

618 auto *WasmSym = cast(CurrentFnSym);

619 WasmSym->setSignature(Signature);

621

623

624

625 if (MDNode *Idx = F.getMetadata("wasm.index")) {

626 assert(Idx->getNumOperands() == 1);

627

629 cast(Idx->getOperand(0))->getValue()));

630 }

631

635

637}

638

641 WebAssembly_MC::verifyInstructionPredicates(MI->getOpcode(),

642 Subtarget->getFeatureBits());

643

644 switch (MI->getOpcode()) {

645 case WebAssembly::ARGUMENT_i32:

646 case WebAssembly::ARGUMENT_i32_S:

647 case WebAssembly::ARGUMENT_i64:

648 case WebAssembly::ARGUMENT_i64_S:

649 case WebAssembly::ARGUMENT_f32:

650 case WebAssembly::ARGUMENT_f32_S:

651 case WebAssembly::ARGUMENT_f64:

652 case WebAssembly::ARGUMENT_f64_S:

653 case WebAssembly::ARGUMENT_v16i8:

654 case WebAssembly::ARGUMENT_v16i8_S:

655 case WebAssembly::ARGUMENT_v8i16:

656 case WebAssembly::ARGUMENT_v8i16_S:

657 case WebAssembly::ARGUMENT_v4i32:

658 case WebAssembly::ARGUMENT_v4i32_S:

659 case WebAssembly::ARGUMENT_v2i64:

660 case WebAssembly::ARGUMENT_v2i64_S:

661 case WebAssembly::ARGUMENT_v4f32:

662 case WebAssembly::ARGUMENT_v4f32_S:

663 case WebAssembly::ARGUMENT_v2f64:

664 case WebAssembly::ARGUMENT_v2f64_S:

665 case WebAssembly::ARGUMENT_v8f16:

666 case WebAssembly::ARGUMENT_v8f16_S:

667

668

669 break;

670 case WebAssembly::FALLTHROUGH_RETURN: {

671

672

674 OutStreamer->AddComment("fallthrough-return");

676 }

677 break;

678 }

679 case WebAssembly::COMPILER_FENCE:

680

681

682 break;

683 case WebAssembly::CATCH:

684 case WebAssembly::CATCH_S:

685 case WebAssembly::CATCH_REF:

686 case WebAssembly::CATCH_REF_S:

687 case WebAssembly::CATCH_ALL:

688 case WebAssembly::CATCH_ALL_S:

689 case WebAssembly::CATCH_ALL_REF:

690 case WebAssembly::CATCH_ALL_REF_S:

691

692

693 break;

694 default: {

697 MCInstLowering.lower(MI, TmpInst);

699 break;

700 }

701 }

702}

703

705 unsigned OpNo,

706 const char *ExtraCode,

708

710 return false;

711

712 if (!ExtraCode) {

717 return false;

719

720

721 assert(MI->getOpcode() == WebAssembly::INLINEASM);

723 return false;

726 return false;

730 return false;

733 return false;

734 default:

735 break;

736 }

737 }

738

739 return true;

740}

741

743 unsigned OpNo,

744 const char *ExtraCode,

746

747

748

749

750

751

753}

754

755

759}

Function Alias Analysis Results

#define LLVM_EXTERNAL_VISIBILITY

Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx

static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")

Module.h This file contains the declarations for the Module class.

This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...

unsigned const TargetRegisterInfo * TRI

This file implements a map that provides insertion order iteration.

static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

This file defines the SmallSet class.

static std::string getEmscriptenInvokeSymbolName(wasm::WasmSignature *Sig)

static bool isEmscriptenInvokeName(StringRef Name)

static char getInvokeSig(wasm::ValType VT)

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyAsmPrinter()

cl::opt< bool > WasmKeepRegisters

This file declares the class to lower WebAssembly MachineInstrs to their corresponding MCInst records...

This file provides WebAssembly-specific target descriptions.

This file declares WebAssembly-specific per-machine-function information.

This file contains the WebAssembly implementation of the WebAssemblyRegisterInfo class.

This file provides signature information for runtime libcalls.

This file registers the WebAssembly target.

This file declares WebAssembly-specific target streamer classes.

This file contains the declaration of the WebAssembly-specific type parsing utility functions.

This file contains the declaration of the WebAssembly-specific utility functions.

MCSymbol * getSymbol(const GlobalValue *GV) const

void EmitToStreamer(MCStreamer &S, const MCInst &Inst)

virtual void emitGlobalVariable(const GlobalVariable *GV)

Emit the specified global variable to the .s file.

TargetMachine & TM

Target machine description.

virtual void PrintSymbolOperand(const MachineOperand &MO, raw_ostream &OS)

Print the MachineOperand as a symbol.

const MCAsmInfo * MAI

Target Asm Printer information.

MachineFunction * MF

The current machine function.

virtual void emitFunctionBodyStart()

Targets can override this to emit stuff before the first basic block in the function.

virtual void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const

This emits linkage information about GVSym based on GV, if this is supported by the target.

void printOffset(int64_t Offset, raw_ostream &OS) const

This is just convenient handler for printing offsets.

MCSymbol * getSymbolPreferLocal(const GlobalValue &GV) const

Similar to getSymbol() but preferred for references.

MCSymbol * CurrentFnSym

The symbol for the current function.

MachineModuleInfo * MMI

This is a pointer to the current MachineModuleInfo.

MCContext & OutContext

This is the context for the output file that we are streaming.

MCSymbol * GetExternalSymbolSymbol(Twine Sym) const

Return the MCSymbol for the specified ExternalSymbol.

bool isPositionIndependent() const

void emitVisibility(MCSymbol *Sym, unsigned Visibility, bool IsDefinition=true) const

This emits visibility information about symbol, if this is supported by the target.

std::unique_ptr< MCStreamer > OutStreamer

This is the MCStreamer object for the file we are generating.

virtual const MCExpr * lowerConstant(const Constant *CV)

Lower the specified LLVM Constant to an MCExpr.

virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...

bool isVerbose() const

Return true if assembly output should contain comments.

@ Debug

Emit .debug_frame.

virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS)

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.

ConstantArray - Constant Array Declarations.

This class represents an Operation in the Expression.

Implements a dense probed hash-table based set.

bool isThreadLocal() const

If the value is "Thread Local", its value isn't shared by the threads.

VisibilityTypes getVisibility() const

bool isDeclaration() const

Return true if the primary definition of this global value is outside of the current translation unit...

unsigned getAddressSpace() const

Module * getParent()

Get the module that this global value is contained inside of...

const DataLayout & getDataLayout() const

Get the data layout of the module this global belongs to.

Type * getValueType() const

bool hasInitializer() const

Definitions have initializers, declarations don't.

static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)

MCSectionWasm * getWasmSection(const Twine &Section, SectionKind K, unsigned Flags=0)

wasm::WasmSignature * createWasmSignature()

Allocates and returns a new WasmSignature instance (with empty parameter and return type lists).

StringRef allocateString(StringRef s)

Allocates a copy of the given string on the allocator managed by this context and returns the result.

const SymbolTable & getSymbols() const

getSymbols - Get a reference for the symbol table for clients that want to, for example,...

Instances of this class represent a single low-level machine instruction.

This represents a section on wasm.

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

void print(raw_ostream &OS, const MCAsmInfo *MAI) const

print - Print the value to the stream OS.

Target specific streamer interface.

StringRef getString() const

MCSymbol * getSymbol() const

Return the MCSymbol for this basic block.

const std::vector< MachineConstantPoolEntry > & getConstants() const

Function & getFunction()

Return the LLVM function that this machine code represents.

MachineConstantPool * getConstantPool()

getConstantPool - Return the constant pool object for the current function.

Representation of each machine instruction.

MachineModuleInfoWasm - This is a MachineModuleInfoImpl implementation for Wasm targets.

SetVector< StringRef > MachineSymbolsUsed

const Module * getModule() const

Ty & getObjFileInfo()

Keep track of various per-module pieces of information for backends that would like to do so.

MachineOperand class - Representation of each machine instruction operand.

MachineBasicBlock * getMBB() const

MachineOperandType getType() const

getType - Returns the MachineOperandType for this operand.

const char * getSymbolName() const

Register getReg() const

getReg - Returns the register number.

@ MO_Immediate

Immediate operand.

@ MO_GlobalAddress

Address of a global value.

@ MO_MachineBasicBlock

MachineBasicBlock reference.

@ MO_Register

Register operand.

@ MO_ExternalSymbol

Name of external global symbol.

int64_t getOffset() const

Return the offset from the symbol in this operand.

const TargetRegisterClass * getRegClass(Register Reg) const

Return the register class of the specified virtual register.

This class implements a map that also provides access to all stored values in a deterministic order.

A Module instance is used to store all the information related to an LLVM module.

LLVMContext & getContext() const

Get the global data context.

Wrapper class representing virtual and physical registers.

constexpr bool isVirtual() const

Return true if the specified register number is in the virtual register namespace.

static SectionKind getMetadata()

SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...

std::pair< const_iterator, bool > insert(const T &V)

insert - Insert an element into the set if it isn't already there.

reference emplace_back(ArgTypes &&... Args)

void push_back(const T &Elt)

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

StringRef - Represent a constant reference to a string, i.e.

TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

The instances of the Type class are immutable: once they are created, they are never changed.

LLVM Value Representation.

const Value * stripPointerCasts() const

Strip off pointer casts, all-zero GEPs and address space casts.

void emitJumpTableInfo() override

Print assembly representations of the jump tables used by the current function to the current output ...

void EmitProducerInfo(Module &M)

void emitGlobalVariable(const GlobalVariable *GV) override

Emit the specified global variable to the .s file.

void EmitTargetFeatures(Module &M)

bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) override

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as...

const WebAssemblySubtarget & getSubtarget() const

WebAssemblyTargetStreamer * getTargetStreamer()

void emitInstruction(const MachineInstr *MI) override

Targets should implement this to emit instructions.

std::string regToString(const MachineOperand &MO)

void emitSymbolType(const MCSymbolWasm *Sym)

MCSymbol * getOrCreateWasmSymbol(StringRef Name)

void emitConstantPool() override

Print to the current output stream assembly representations of the constants in the constant pool MCP...

MVT getRegType(unsigned RegNo) const

void emitDecls(const Module &M)

void emitFunctionBodyStart() override

Targets can override this to emit stuff before the first basic block in the function.

bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) override

Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.

MCSymbolWasm * getMCSymbolForFunction(const Function *F, bool EnableEmEH, wasm::WasmSignature *Sig, bool &InvokeDetected)

void EmitFunctionAttributes(Module &M)

void emitEndOfAsmFile(Module &M) override

This virtual method can be overridden by targets that want to emit something at the end of their file...

bool isVRegStackified(unsigned VReg) const

unsigned getWAReg(unsigned VReg) const

const std::vector< MVT > & getLocals() const

This class is used to lower an MachineInstr into an MCInst.

void lower(const MachineInstr *MI, MCInst &OutMI) const

const WebAssemblyTargetLowering * getTargetLowering() const override

const WebAssemblyRegisterInfo * getRegisterInfo() const override

WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...

virtual void emitFunctionType(const MCSymbolWasm *Sym)=0

.functype

virtual void emitLocal(ArrayRef< wasm::ValType > Types)=0

.local

virtual void emitTagType(const MCSymbolWasm *Sym)=0

.tagtype

virtual void emitExportName(const MCSymbolWasm *Sym, StringRef ExportName)=0

.export_name

virtual void emitGlobalType(const MCSymbolWasm *Sym)=0

.globaltype

virtual void emitImportModule(const MCSymbolWasm *Sym, StringRef ImportModule)=0

.import_module

virtual void emitTableType(const MCSymbolWasm *Sym)=0

.tabletype

virtual void emitImportName(const MCSymbolWasm *Sym, StringRef ImportName)=0

.import_name

virtual void emitIndIdx(const MCExpr *Value)=0

.indidx

std::pair< iterator, bool > insert(const ValueT &V)

This class implements an extremely fast bulk output stream that can only output to a stream.

StringRef LanguageString(unsigned Language)

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

MCSymbolWasm * getOrCreateFunctionTableSymbol(MCContext &Ctx, const WebAssemblySubtarget *Subtarget)

Returns the __indirect_function_table, for use in call_indirect and in function bitcasts.

void wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT, ArrayRef< MVT > VTs)

Sets a Wasm Symbol Type.

static const unsigned UnusedReg

cl::opt< bool > WasmEnableEmEH

cl::opt< bool > WasmEnableEmSjLj

std::string signatureToString(const wasm::WasmSignature *Sig)

void getLibcallSignature(const WebAssemblySubtarget &Subtarget, RTLIB::Libcall LC, SmallVectorImpl< wasm::ValType > &Rets, SmallVectorImpl< wasm::ValType > &Params)

bool isWasmVarAddressSpace(unsigned AS)

@ WASM_SYMBOL_TYPE_GLOBAL

@ WASM_SYMBOL_TYPE_FUNCTION

@ WASM_FEATURE_PREFIX_USED

@ WASM_FEATURE_PREFIX_DISALLOWED

This is an optimization pass for GlobalISel generic memory operations.

void computeSignatureVTs(const FunctionType *Ty, const Function *TargetFunc, const Function &ContextFunc, const TargetMachine &TM, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results)

const SubtargetFeatureKV WebAssemblyFeatureKV[WebAssembly::NumSubtargetFeatures]

bool getConstantStringInfo(const Value *V, StringRef &Str, bool TrimAtNul=true)

This function computes the length of a null-terminated C string pointed to by V.

raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.

Target & getTheWebAssemblyTarget32()

void report_fatal_error(Error Err, bool gen_crash_diag=true)

Report a serious error, calling any installed error handler.

raw_fd_ostream & errs()

This returns a reference to a raw_ostream for standard error.

Target & getTheWebAssemblyTarget64()

void valTypesFromMVTs(ArrayRef< MVT > In, SmallVectorImpl< wasm::ValType > &Out)

wasm::WasmSignature * signatureFromMVTs(MCContext &Ctx, const SmallVectorImpl< MVT > &Results, const SmallVectorImpl< MVT > &Params)

void computeLegalValueVTs(const WebAssemblyTargetLowering &TLI, LLVMContext &Ctx, const DataLayout &DL, Type *Ty, SmallVectorImpl< MVT > &ValueVTs)

@ MCSA_NoDeadStrip

.no_dead_strip (MachO)

RegisterAsmPrinter - Helper template for registering a target specific assembly printer,...

Used to provide key value pairs for feature and CPU bit flags.

SmallVector< ValType, 1 > Returns

SmallVector< ValType, 4 > Params