summaryrefslogtreecommitdiff
path: root/tools/yaml2obj/yaml2wasm.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-02-15 20:48:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-02-15 20:48:51 +0000
commit519e1985aef0136fe593e52b5404e2934b077115 (patch)
tree2ed0abe9c0ca3ad3309b537d91c64bc91c8f0176 /tools/yaml2obj/yaml2wasm.cpp
parente79719ce607b6130e41e23dbdc90cc6b4e0401e6 (diff)
Vendor import of llvm release_80 branch r354130:vendor/llvm/llvm-release_80-r354130
Notes
svn path=/vendor/llvm/dist-release_80/; revision=344166 svn path=/vendor/llvm/llvm-release_80-r354130/; revision=344167; tag=vendor/llvm/llvm-release_80-r354130
Diffstat (limited to 'tools/yaml2obj/yaml2wasm.cpp')
-rw-r--r--tools/yaml2obj/yaml2wasm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/yaml2obj/yaml2wasm.cpp b/tools/yaml2obj/yaml2wasm.cpp
index 2d3e3b71f086..7d08e62bcedd 100644
--- a/tools/yaml2obj/yaml2wasm.cpp
+++ b/tools/yaml2obj/yaml2wasm.cpp
@@ -172,7 +172,8 @@ int WasmWriter::writeSectionContent(raw_ostream &OS,
case wasm::WASM_SYMBOL_TYPE_GLOBAL:
case wasm::WASM_SYMBOL_TYPE_EVENT:
encodeULEB128(Info.ElementIndex, SubSection.GetStream());
- if ((Info.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0)
+ if ((Info.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0 ||
+ (Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0)
writeStringRef(Info.Name, SubSection.GetStream());
break;
case wasm::WASM_SYMBOL_TYPE_DATA: