summaryrefslogtreecommitdiffstats
path: root/lld/wasm/InputChunks.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-05-05 00:18:43 +0000
committerSam Clegg <sbc@chromium.org>2018-05-05 00:18:43 +0000
commitc1953144acfe6d1d58bad73b3b5ee4e1eb868c1c (patch)
tree31ad822d51a511704288e9696c134ccf6f6a3115 /lld/wasm/InputChunks.h
parentb6e64e734d80723c7e7c5b8e77f4b4a2d0a4c9e6 (diff)
downloadbcm5719-llvm-c1953144acfe6d1d58bad73b3b5ee4e1eb868c1c.tar.gz
bcm5719-llvm-c1953144acfe6d1d58bad73b3b5ee4e1eb868c1c.zip
[WebAssembly] Only perform sanity checking of relocation targets in debug builds
Also: - Reduce the error to a warning so that debug and release versions can still link the same inputs. - Add another check to verify the input LEB is padded to 5 bytes Differential Revision: https://reviews.llvm.org/D46479 llvm-svn: 331571
Diffstat (limited to 'lld/wasm/InputChunks.h')
-rw-r--r--lld/wasm/InputChunks.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/wasm/InputChunks.h b/lld/wasm/InputChunks.h
index 4bebfbd940f..b816ff8468f 100644
--- a/lld/wasm/InputChunks.h
+++ b/lld/wasm/InputChunks.h
@@ -79,6 +79,10 @@ protected:
virtual ArrayRef<uint8_t> data() const = 0;
virtual uint32_t getInputSectionOffset() const = 0;
+ // Verifies the existing data at relocation targets matches our expectations.
+ // This is performed only debug builds as an extra sanity check.
+ void verifyRelocTargets() const;
+
std::vector<WasmRelocation> Relocations;
Kind SectionKind;
};
OpenPOWER on IntegriCloud