[lld] e40e17f - [ELF] Make ExprValue smaller. NFC'
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 16:55:11 PST 2021
Author: Fangrui Song
Date: 2021-11-25T16:55:06-08:00
New Revision: e40e17fcaf7ae28f16d4ece716f336b276ab8dce
URL: https://github.com/llvm/llvm-project/commit/e40e17fcaf7ae28f16d4ece716f336b276ab8dce
DIFF: https://github.com/llvm/llvm-project/commit/e40e17fcaf7ae28f16d4ece716f336b276ab8dce.diff
LOG: [ELF] Make ExprValue smaller. NFC'
Added:
Modified:
lld/ELF/LinkerScript.h
Removed:
################################################################################
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 7faa49a794f9..a94212eb33b1 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -41,7 +41,7 @@ class ThunkSection;
struct ExprValue {
ExprValue(SectionBase *sec, bool forceAbsolute, uint64_t val,
const Twine &loc)
- : sec(sec), forceAbsolute(forceAbsolute), val(val), loc(loc.str()) {}
+ : sec(sec), val(val), forceAbsolute(forceAbsolute), loc(loc.str()) {}
ExprValue(uint64_t val) : ExprValue(nullptr, false, val, "") {}
@@ -53,10 +53,6 @@ struct ExprValue {
// If a value is relative to a section, it has a non-null Sec.
SectionBase *sec;
- // True if this expression is enclosed in ABSOLUTE().
- // This flag affects the return value of getValue().
- bool forceAbsolute;
-
uint64_t val;
uint64_t alignment = 1;
@@ -64,6 +60,10 @@ struct ExprValue {
// resets type to STT_NOTYPE.
uint8_t type = llvm::ELF::STT_NOTYPE;
+ // True if this expression is enclosed in ABSOLUTE().
+ // This flag affects the return value of getValue().
+ bool forceAbsolute;
+
// Original source location. Used for error messages.
std::string loc;
};
More information about the llvm-commits
mailing list