}
const char *WebAssemblyAsmPrinter::toString(MVT VT) const {
- switch (VT.SimpleTy) {
- default:
- break;
- case MVT::f32:
- return "f32";
- case MVT::f64:
- return "f64";
- case MVT::i32:
- return "i32";
- case MVT::i64:
- return "i64";
- }
- DEBUG(dbgs() << "Invalid type " << EVT(VT).getEVTString() << '\n');
- llvm_unreachable("invalid type");
- return "<invalid>";
+ return WebAssembly::TypeToString(VT);
}
//===----------------------------------------------------------------------===//
// Nothing to do; jump tables are incorporated into the instruction stream.
}
-static void ComputeLegalValueVTs(const Function &F,
- const TargetMachine &TM,
- Type *Ty,
- SmallVectorImpl<MVT> &ValueVTs) {
- const DataLayout& DL(F.getParent()->getDataLayout());
+static void ComputeLegalValueVTs(const Function &F, const TargetMachine &TM,
+ Type *Ty, SmallVectorImpl<MVT> &ValueVTs) {
+ const DataLayout &DL(F.getParent()->getDataLayout());
const WebAssemblyTargetLowering &TLI =
*TM.getSubtarget<WebAssemblySubtarget>(F).getTargetLowering();
SmallVector<EVT, 4> VTs;
EmitToStreamer(*OutStreamer, Param);
}
-
SmallVector<MVT, 4> ResultVTs;
const Function &F(*MF->getFunction());
ComputeLegalValueVTs(F, TM, F.getReturnType(), ResultVTs);