summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-01-31 19:50:14 +0000
committerSam Clegg <sbc@chromium.org>2018-01-31 19:50:14 +0000
commit6e7f1826c58932c0e987d8eca5b9055439161b13 (patch)
tree026cc7c2042402c331710cb6d709d92011b1c15b /llvm/lib/Object
parentf9edbe95db69e851c2bed712318f43b45de31ddd (diff)
downloadbcm5719-llvm-6e7f1826c58932c0e987d8eca5b9055439161b13.tar.gz
bcm5719-llvm-6e7f1826c58932c0e987d8eca5b9055439161b13.zip
[WebAssembly] MC: Remove unused code for handling of wasm globals
For now, we are not using wasm globals, except for modeling of the stack points. Alos, factor out common struct WasmGlobalType, which matches the name for that tuple in the Wasm spec and rename methods to "isBindingGlobal", "isTypeGlobal" to avoid ambiguity. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42750 llvm-svn: 323901
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 2bba662171b..3b361390ea1 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -713,8 +713,8 @@ Error WasmObjectFile::parseGlobalSection(const uint8_t *Ptr, const uint8_t *End)
while (Count--) {
wasm::WasmGlobal Global;
Global.Index = NumImportedGlobals + Globals.size();
- Global.Type = readVarint7(Ptr);
- Global.Mutable = readVaruint1(Ptr);
+ Global.Type.Type = readVarint7(Ptr);
+ Global.Type.Mutable = readVaruint1(Ptr);
if (Error Err = readInitExpr(Global.InitExpr, Ptr))
return Err;
Globals.push_back(Global);
@@ -883,9 +883,9 @@ uint32_t WasmObjectFile::getSymbolFlags(DataRefImpl Symb) const {
const WasmSymbol &Sym = getWasmSymbol(Symb);
DEBUG(dbgs() << "getSymbolFlags: ptr=" << &Sym << " " << Sym << "\n");
- if (Sym.isWeak())
+ if (Sym.isBindingWeak())
Result |= SymbolRef::SF_Weak;
- if (!Sym.isLocal())
+ if (!Sym.isBindingLocal())
Result |= SymbolRef::SF_Global;
if (Sym.isHidden())
Result |= SymbolRef::SF_Hidden;
OpenPOWER on IntegriCloud