[PATCH] D50976: [WebAssembly] Update Config member to match command line option
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 10:01:19 PDT 2018
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D50976
Files:
wasm/Config.h
wasm/Driver.cpp
wasm/InputChunks.cpp
wasm/InputChunks.h
Index: wasm/InputChunks.h
===================================================================
--- wasm/InputChunks.h
+++ wasm/InputChunks.h
@@ -139,7 +139,7 @@
uint32_t getFunctionInputOffset() const { return getInputSectionOffset(); }
uint32_t getFunctionCodeOffset() const { return Function->CodeOffset; }
uint32_t getSize() const override {
- if (Config->CompressRelocTargets && File) {
+ if (Config->CompressRelocations && File) {
assert(CompressedSize);
return CompressedSize;
}
@@ -162,7 +162,7 @@
protected:
ArrayRef<uint8_t> data() const override {
- assert(!Config->CompressRelocTargets);
+ assert(!Config->CompressRelocations);
return File->CodeSection->Content.slice(getInputSectionOffset(),
Function->Size);
}
Index: wasm/InputChunks.cpp
===================================================================
--- wasm/InputChunks.cpp
+++ wasm/InputChunks.cpp
@@ -228,7 +228,7 @@
// 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->CompressRelocTargets)
+ if (!File || !Config->CompressRelocations)
return;
LLVM_DEBUG(dbgs() << "calculateSize: " << getName() << "\n");
@@ -263,7 +263,7 @@
// Override the default writeTo method so that we can (optionally) write the
// compressed version of the function.
void InputFunction::writeTo(uint8_t *Buf) const {
- if (!File || !Config->CompressRelocTargets)
+ if (!File || !Config->CompressRelocations)
return InputChunk::writeTo(Buf);
Buf += OutputOffset;
Index: wasm/Driver.cpp
===================================================================
--- wasm/Driver.cpp
+++ wasm/Driver.cpp
@@ -395,7 +395,7 @@
Config->SearchPaths = args::getStrings(Args, OPT_L);
Config->StripAll = Args.hasArg(OPT_strip_all);
Config->StripDebug = Args.hasArg(OPT_strip_debug);
- Config->CompressRelocTargets = Args.hasArg(OPT_compress_relocations);
+ Config->CompressRelocations = Args.hasArg(OPT_compress_relocations);
Config->StackFirst = Args.hasArg(OPT_stack_first);
Config->ThinLTOCacheDir = Args.getLastArgValue(OPT_thinlto_cache_dir);
Config->ThinLTOCachePolicy = CHECK(
@@ -411,7 +411,7 @@
Config->ZStackSize =
args::getZOptionValue(Args, OPT_z, "stack-size", WasmPageSize);
- if (!Config->StripDebug && !Config->StripAll && Config->CompressRelocTargets)
+ if (!Config->StripDebug && !Config->StripAll && Config->CompressRelocations)
error("--compress-relocations is incompatible with output debug"
" information. Please pass --strip-debug or --strip-all");
@@ -441,7 +441,7 @@
error("entry point specified for relocatable output file");
if (Config->GcSections)
error("-r and --gc-sections may not be used together");
- if (Config->CompressRelocTargets)
+ if (Config->CompressRelocations)
error("-r -and --compress-relocations may not be used together");
if (Args.hasArg(OPT_undefined))
error("-r -and --undefined may not be used together");
Index: wasm/Config.h
===================================================================
--- wasm/Config.h
+++ wasm/Config.h
@@ -20,7 +20,7 @@
struct Configuration {
bool AllowUndefined;
- bool CompressRelocTargets;
+ bool CompressRelocations;
bool Demangle;
bool DisableVerify;
bool ExportAll;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50976.161499.patch
Type: text/x-patch
Size: 3475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/2463a873/attachment.bin>
More information about the llvm-commits
mailing list