diff options
Diffstat (limited to 'lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp')
-rw-r--r-- | lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp index fe8a5e4c06f1..6cf81a9d77b3 100644 --- a/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp +++ b/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp @@ -88,7 +88,6 @@ enum RuntimeLibcallSignature { unsupported }; - struct RuntimeLibcallSignatureTable { std::vector<RuntimeLibcallSignature> Table; @@ -486,18 +485,17 @@ struct StaticLibcallNameMap { } // end anonymous namespace - - -void llvm::GetSignature(const WebAssemblySubtarget &Subtarget, - RTLIB::Libcall LC, SmallVectorImpl<wasm::ValType> &Rets, - SmallVectorImpl<wasm::ValType> &Params) { +void llvm::GetLibcallSignature(const WebAssemblySubtarget &Subtarget, + RTLIB::Libcall LC, + SmallVectorImpl<wasm::ValType> &Rets, + SmallVectorImpl<wasm::ValType> &Params) { assert(Rets.empty()); assert(Params.empty()); wasm::ValType iPTR = Subtarget.hasAddr64() ? wasm::ValType::I64 : wasm::ValType::I32; - auto& Table = RuntimeLibcallSignatures->Table; + auto &Table = RuntimeLibcallSignatures->Table; switch (Table[LC]) { case func: break; @@ -834,11 +832,12 @@ void llvm::GetSignature(const WebAssemblySubtarget &Subtarget, static ManagedStatic<StaticLibcallNameMap> LibcallNameMap; // TODO: If the RTLIB::Libcall-taking flavor of GetSignature remains unsed // other than here, just roll its logic into this version. -void llvm::GetSignature(const WebAssemblySubtarget &Subtarget, const char *Name, - SmallVectorImpl<wasm::ValType> &Rets, - SmallVectorImpl<wasm::ValType> &Params) { - auto& Map = LibcallNameMap->Map; +void llvm::GetLibcallSignature(const WebAssemblySubtarget &Subtarget, + const char *Name, + SmallVectorImpl<wasm::ValType> &Rets, + SmallVectorImpl<wasm::ValType> &Params) { + auto &Map = LibcallNameMap->Map; auto val = Map.find(Name); assert(val != Map.end() && "unexpected runtime library name"); - return GetSignature(Subtarget, val->second, Rets, Params); + return GetLibcallSignature(Subtarget, val->second, Rets, Params); } |