[PATCH] D91803: [lld] Use -1 as tombstone value for discarded code ranges
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 10:35:04 PST 2020
MaskRay accepted this revision.
MaskRay added a comment.
Looks great! Please include diff context in future patches (https://llvm.org/docs/GettingStarted.html#sending-patches)
================
Comment at: lld/wasm/InputChunks.cpp:435
+ if (name.equals(".debug_ranges") || name.equals(".debug_loc"))
+ return -2l;
+ return -1l;
----------------
-2l is correct but is not an appropriate literal suffix. `UINT64_C(-2)` can be used.
================
Comment at: lld/wasm/InputFiles.cpp:210
+
+ if ((isa<FunctionSymbol>(sym) || isa<DataSymbol>(sym)) && !sym->isLive()) {
+ return tombstone ? tombstone : reloc.Addend;
----------------
Delete braces
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91803/new/
https://reviews.llvm.org/D91803
More information about the llvm-commits
mailing list