[PATCH] D42278: [WebAssembly] change WasmExportEntry.Symbol to WasmExportEntry.Sym
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 19:11:06 PST 2018
inglorion created this revision.
inglorion added reviewers: sbc100, sunfish.
Herald added subscribers: aheejin, jgravelle-google, dschuff, jfb.
This stops gcc complaining that the declaration changes the meaning of
'Symbol' from 'class lld::wasm::Symbol'.
https://reviews.llvm.org/D42278
Files:
lld/wasm/Writer.cpp
Index: lld/wasm/Writer.cpp
===================================================================
--- lld/wasm/Writer.cpp
+++ lld/wasm/Writer.cpp
@@ -64,7 +64,7 @@
// A Wasm export to be written into the export section.
struct WasmExportEntry {
- const Symbol *Symbol;
+ const Symbol *Sym;
StringRef FieldName; // may not match the Symbol name
};
@@ -286,11 +286,11 @@
}
for (const WasmExportEntry &E : ExportedSymbols) {
- DEBUG(dbgs() << "Export: " << E.Symbol->getName() << "\n");
+ DEBUG(dbgs() << "Export: " << E.Sym->getName() << "\n");
WasmExport Export;
Export.Name = E.FieldName;
- Export.Index = E.Symbol->getOutputIndex();
- if (E.Symbol->isFunction())
+ Export.Index = E.Sym->getOutputIndex();
+ if (E.Sym->isFunction())
Export.Kind = WASM_EXTERNAL_FUNCTION;
else
Export.Kind = WASM_EXTERNAL_GLOBAL;
@@ -388,9 +388,9 @@
std::vector<std::pair<StringRef, uint32_t>> SymbolInfo;
for (const WasmExportEntry &E : ExportedSymbols) {
uint32_t Flags =
- (E.Symbol->isLocal() ? WASM_SYMBOL_BINDING_LOCAL :
- E.Symbol->isWeak() ? WASM_SYMBOL_BINDING_WEAK : 0) |
- (E.Symbol->isHidden() ? WASM_SYMBOL_VISIBILITY_HIDDEN : 0);
+ (E.Sym->isLocal() ? WASM_SYMBOL_BINDING_LOCAL :
+ E.Sym->isWeak() ? WASM_SYMBOL_BINDING_WEAK : 0) |
+ (E.Sym->isHidden() ? WASM_SYMBOL_VISIBILITY_HIDDEN : 0);
if (Flags)
SymbolInfo.emplace_back(E.FieldName, Flags);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42278.130541.patch
Type: text/x-patch
Size: 1479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180119/37ffe571/attachment.bin>
More information about the llvm-commits
mailing list