ReturnTypes.assign(Sig.Returns.begin(), Sig.Returns.end());
}
-void WebAssemblyAsmTypeCheck::localDecl(const SmallVector<wasm::ValType, 4> &Locals) {
+void WebAssemblyAsmTypeCheck::localDecl(
+ const SmallVectorImpl<wasm::ValType> &Locals) {
LocalTypes.insert(LocalTypes.end(), Locals.begin(), Locals.end());
}
WebAssemblyAsmTypeCheck(MCAsmParser &Parser, const MCInstrInfo &MII, bool is64);
void funcDecl(const wasm::WasmSignature &Sig);
- void localDecl(const SmallVector<wasm::ValType, 4> &Locals);
+ void localDecl(const SmallVectorImpl<wasm::ValType> &Locals);
void setLastSig(const wasm::WasmSignature &Sig) { LastSig = Sig; }
bool endOfFunction(SMLoc ErrorLoc);
bool typeCheck(SMLoc ErrorLoc, const MCInst &Inst, OperandVector &Operands);
}
void WebAssembly::wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT,
- const SmallVector<MVT, 1> &VTs) {
+ const ArrayRef<MVT> &VTs) {
assert(!Sym->getType());
// Tables are represented as Arrays in LLVM IR therefore
/// Sets a Wasm Symbol Type.
void wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT,
- const SmallVector<MVT, 1> &VTs);
+ const ArrayRef<MVT> &VTs);
} // end namespace WebAssembly
} // end namespace llvm
}
MCOperand WebAssemblyMCInstLower::lowerTypeIndexOperand(
- SmallVector<wasm::ValType, 1> &&Returns,
- SmallVector<wasm::ValType, 4> &&Params) const {
+ SmallVectorImpl<wasm::ValType> &&Returns,
+ SmallVectorImpl<wasm::ValType> &&Params) const {
auto Signature = std::make_unique<wasm::WasmSignature>(std::move(Returns),
std::move(Params));
MCSymbol *Sym = Printer.createTempSymbol("typeindex");
MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
- MCOperand lowerTypeIndexOperand(SmallVector<wasm::ValType, 1> &&,
- SmallVector<wasm::ValType, 4> &&) const;
+ MCOperand lowerTypeIndexOperand(SmallVectorImpl<wasm::ValType> &&,
+ SmallVectorImpl<wasm::ValType> &&) const;
public:
WebAssemblyMCInstLower(MCContext &ctx, WebAssemblyAsmPrinter &printer)