mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 00:20:14 +00:00
[COFF] Move KeepUnique bit from Chunk to SectionChunk, NFC
The KeepUnique bit is used during ICF, which only operates on SectionChunks, so only SectionChunks need it. This frees up a byte in Chunk, which I plan to use in a follow-up change. llvm-svn: 361549
This commit is contained in:
parent
edb52e2e7d
commit
14f4ff6e89
@ -122,14 +122,9 @@ public:
|
||||
|
||||
protected:
|
||||
Chunk(Kind K = OtherKind) : ChunkKind(K) {}
|
||||
|
||||
const Kind ChunkKind;
|
||||
|
||||
public:
|
||||
// Whether this section needs to be kept distinct from other sections during
|
||||
// ICF. This is set by the driver using address-significance tables.
|
||||
bool KeepUnique = false;
|
||||
|
||||
protected:
|
||||
// The alignment of this chunk, stored in log2 form. The writer uses the
|
||||
// value.
|
||||
uint8_t P2Align = 0;
|
||||
@ -137,7 +132,6 @@ protected:
|
||||
// The RVA of this chunk in the output. The writer sets a value.
|
||||
uint32_t RVA = 0;
|
||||
|
||||
protected:
|
||||
// The output section for this chunk.
|
||||
OutputSection *Out = nullptr;
|
||||
};
|
||||
@ -283,6 +277,10 @@ public:
|
||||
// Used by the garbage collector.
|
||||
bool Live;
|
||||
|
||||
// Whether this section needs to be kept distinct from other sections during
|
||||
// ICF. This is set by the driver using address-significance tables.
|
||||
bool KeepUnique = false;
|
||||
|
||||
// The COMDAT selection if this is a COMDAT chunk.
|
||||
llvm::COFF::COMDATType Selection = (llvm::COFF::COMDATType)0;
|
||||
|
||||
|
@ -858,7 +858,7 @@ static void parseOrderFile(StringRef Arg) {
|
||||
|
||||
static void markAddrsig(Symbol *S) {
|
||||
if (auto *D = dyn_cast_or_null<Defined>(S))
|
||||
if (Chunk *C = D->getChunk())
|
||||
if (SectionChunk *C = dyn_cast_or_null<SectionChunk>(D->getChunk()))
|
||||
C->KeepUnique = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user