Skip to content

Commit a45ec69

Browse files
committed
clean up
1 parent d6e17c9 commit a45ec69

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lld/wasm/InputFiles.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void ObjFile::addLegacyIndirectFunctionTableIfNeeded(
335335
const WasmGlobalType *globalType = nullptr;
336336
const WasmSignature *signature = nullptr;
337337
auto *wasmSym =
338-
make<WasmSymbol>(std::move(info), globalType, &tableImport->Table, signature);
338+
make<WasmSymbol>(info, globalType, &tableImport->Table, signature);
339339
Symbol *sym = createUndefined(*wasmSym, false);
340340
// We're only sure it's a TableSymbol if the createUndefined succeeded.
341341
if (errorCount())

llvm/include/llvm/Object/Wasm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace object {
3434

3535
class WasmSymbol {
3636
public:
37-
WasmSymbol(const wasm::WasmSymbolInfo &&Info,
37+
WasmSymbol(const wasm::WasmSymbolInfo &Info,
3838
const wasm::WasmGlobalType *GlobalType,
3939
const wasm::WasmTableType *TableType,
4040
const wasm::WasmSignature *Signature)
@@ -45,7 +45,7 @@ class WasmSymbol {
4545

4646
// Symbol info as represented in the symbol's 'syminfo' entry of an object
4747
// file's symbol table.
48-
const wasm::WasmSymbolInfo Info;
48+
wasm::WasmSymbolInfo Info;
4949
const wasm::WasmGlobalType *GlobalType;
5050
const wasm::WasmTableType *TableType;
5151
const wasm::WasmSignature *Signature;

llvm/lib/Object/WasmObjectFile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadContext &Ctx) {
842842
return make_error<GenericBinaryError>("duplicate symbol name " +
843843
Twine(Info.Name),
844844
object_error::parse_failed);
845-
Symbols.emplace_back(std::move(Info), GlobalType, TableType,
845+
Symbols.emplace_back(Info, GlobalType, TableType,
846846
Signature);
847847
LLVM_DEBUG(dbgs() << "Adding symbol: " << Symbols.back() << "\n");
848848
}
@@ -1451,7 +1451,7 @@ Error WasmObjectFile::parseExportSection(ReadContext &Ctx) {
14511451
}
14521452
Exports.push_back(Ex);
14531453
if (Ex.Kind != wasm::WASM_EXTERNAL_MEMORY) {
1454-
Symbols.emplace_back(std::move(Info), GlobalType,
1454+
Symbols.emplace_back(Info, GlobalType,
14551455
TableType, Signature);
14561456
LLVM_DEBUG(dbgs() << "Adding symbol: " << Symbols.back() << "\n");
14571457
}

llvm/tools/obj2yaml/wasm2yaml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
124124
}
125125

126126
uint32_t SymbolIndex = 0;
127-
for (const auto &Sym : Obj.symbols()) {
127+
for (const object::SymbolRef &Sym : Obj.symbols()) {
128128
const wasm::WasmSymbolInfo& Symbol = Obj.getWasmSymbol(Sym).Info;
129129
WasmYAML::SymbolInfo Info;
130130
Info.Index = SymbolIndex++;

0 commit comments

Comments
 (0)