aboutsummaryrefslogtreecommitdiff
path: root/lld/wasm/InputChunks.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2025-01-09 18:43:11 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2025-01-09 18:43:11 +0900
commit0e1a753549b29ff1f5a190aca83b803a33b51628 (patch)
treee5578f8810c65711304128d0c8add7fa1f77b9d8 /lld/wasm/InputChunks.cpp
parent3c6252260ee11e3a453076b4d96ffffe20d49998 (diff)
parentbdcf47e4bcb92889665825654bb80a8bbe30379e (diff)
downloadllvm-users/chapuni/cov/single/if.zip
llvm-users/chapuni/cov/single/if.tar.gz
llvm-users/chapuni/cov/single/if.tar.bz2
Merge branch 'users/chapuni/cov/single/base' into users/chapuni/cov/single/ifusers/chapuni/cov/single/if
Conflicts: clang/lib/CodeGen/CoverageMappingGen.cpp
Diffstat (limited to 'lld/wasm/InputChunks.cpp')
-rw-r--r--lld/wasm/InputChunks.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp
index 9383dca..ccdc92f 100644
--- a/lld/wasm/InputChunks.cpp
+++ b/lld/wasm/InputChunks.cpp
@@ -67,7 +67,7 @@ uint32_t InputChunk::getSize() const {
return ms->builder.getSize();
if (const auto *f = dyn_cast<InputFunction>(this)) {
- if (config->compressRelocations && f->file) {
+ if (ctx.arg.compressRelocations && f->file) {
return f->getCompressedSize();
}
}
@@ -84,7 +84,7 @@ uint32_t InputChunk::getInputSize() const {
// Copy this input chunk to an mmap'ed output file and apply relocations.
void InputChunk::writeTo(uint8_t *buf) const {
if (const auto *f = dyn_cast<InputFunction>(this)) {
- if (file && config->compressRelocations)
+ if (file && ctx.arg.compressRelocations)
return f->writeCompressed(buf);
} else if (const auto *ms = dyn_cast<SyntheticMergedChunk>(this)) {
ms->builder.write(buf + outSecOff);
@@ -269,7 +269,7 @@ static unsigned getRelocWidth(const WasmRelocation &rel, uint64_t value) {
// This function only computes the final output size. It must be called
// before getSize() is used to calculate of layout of the code section.
void InputFunction::calculateSize() {
- if (!file || !config->compressRelocations)
+ if (!file || !ctx.arg.compressRelocations)
return;
LLVM_DEBUG(dbgs() << "calculateSize: " << name << "\n");
@@ -365,7 +365,7 @@ bool InputChunk::generateRelocationCode(raw_ostream &os) const {
LLVM_DEBUG(dbgs() << "generating runtime relocations: " << name
<< " count=" << relocations.size() << "\n");
- bool is64 = config->is64.value_or(false);
+ bool is64 = ctx.arg.is64.value_or(false);
bool generated = false;
unsigned opcode_ptr_const = is64 ? WASM_OPCODE_I64_CONST
: WASM_OPCODE_I32_CONST;