Rename NotFlags -> NegFlags.
Negative flags are still bit flags, so I think "not flag" is a very good name.
llvm-svn: 293143
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index d94d7a2..0357357 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -547,7 +547,7 @@
// See if a region can be found by matching section flags.
for (auto &MRI : Opt.MemoryRegions) {
MemoryRegion &MR = MRI.second;
- if ((MR.Flags & Sec->Flags) != 0 && (MR.NotFlags & Sec->Flags) == 0)
+ if ((MR.Flags & Sec->Flags) != 0 && (MR.NegFlags & Sec->Flags) == 0)
return &MR;
}
@@ -2027,9 +2027,9 @@
StringRef Name = next();
uint32_t Flags = 0;
- uint32_t NotFlags = 0;
+ uint32_t NegFlags = 0;
if (consume("(")) {
- std::tie(Flags, NotFlags) = readMemoryAttributes();
+ std::tie(Flags, NegFlags) = readMemoryAttributes();
expect(")");
}
expect(":");
@@ -2043,7 +2043,7 @@
if (It != Opt.MemoryRegions.end())
setError("region '" + Name + "' already defined");
else
- Opt.MemoryRegions[Name] = {Name, Origin, Length, Origin, Flags, NotFlags};
+ Opt.MemoryRegions[Name] = {Name, Origin, Length, Origin, Flags, NegFlags};
}
}
@@ -2052,7 +2052,7 @@
// are only used when an explicit memory region name is not used.
std::pair<uint32_t, uint32_t> ScriptParser::readMemoryAttributes() {
uint32_t Flags = 0;
- uint32_t NotFlags = 0;
+ uint32_t NegFlags = 0;
bool Invert = false;
for (char C : next().lower()) {
@@ -2069,11 +2069,11 @@
setError("invalid memory region attribute");
if (Invert)
- NotFlags |= Flag;
+ NegFlags |= Flag;
else
Flags |= Flag;
}
- return {Flags, NotFlags};
+ return {Flags, NegFlags};
}
void elf::readLinkerScript(MemoryBufferRef MB) {