aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:11 +0000
commite3b557809604d036af6e00c60f012c2025b59a5e (patch)
tree8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/Object/WasmObjectFile.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index d00359c6deef..1e98de7cd42e 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -640,9 +640,7 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadContext &Ctx) {
Info.Name = Import.Field;
}
Signature = &Signatures[Import.SigIndex];
- if (!Import.Module.empty()) {
- Info.ImportModule = Import.Module;
- }
+ Info.ImportModule = Import.Module;
}
break;
@@ -672,9 +670,7 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadContext &Ctx) {
Info.Name = Import.Field;
}
GlobalType = &Import.Global;
- if (!Import.Module.empty()) {
- Info.ImportModule = Import.Module;
- }
+ Info.ImportModule = Import.Module;
}
break;
@@ -704,9 +700,7 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadContext &Ctx) {
Info.Name = Import.Field;
}
TableType = &Import.Table;
- if (!Import.Module.empty()) {
- Info.ImportModule = Import.Module;
- }
+ Info.ImportModule = Import.Module;
}
break;
@@ -769,9 +763,7 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadContext &Ctx) {
Info.Name = Import.Field;
}
Signature = &Signatures[Import.SigIndex];
- if (!Import.Module.empty()) {
- Info.ImportModule = Import.Module;
- }
+ Info.ImportModule = Import.Module;
}
break;
}
@@ -1841,7 +1833,7 @@ Triple::ArchType WasmObjectFile::getArch() const {
return HasMemory64 ? Triple::wasm64 : Triple::wasm32;
}
-SubtargetFeatures WasmObjectFile::getFeatures() const {
+Expected<SubtargetFeatures> WasmObjectFile::getFeatures() const {
return SubtargetFeatures();
}