mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-28 16:11:29 +00:00
Cleanup: avoid referring to std::vector<T> members when T is incomplete.
This is not legal according to the C++ standard, and causes build errors in particular in C++20 mode. Fix it by defining the vector's type before using the vector. Patch by poompatai@google.com.
This commit is contained in:
parent
b6042cdf8b
commit
d5e4a5a12f
@ -174,6 +174,23 @@ protected:
|
||||
NonSectionChunk(Kind k = OtherKind) : Chunk(k) {}
|
||||
};
|
||||
|
||||
// MinGW specific; information about one individual location in the image
|
||||
// that needs to be fixed up at runtime after loading. This represents
|
||||
// one individual element in the PseudoRelocTableChunk table.
|
||||
class RuntimePseudoReloc {
|
||||
public:
|
||||
RuntimePseudoReloc(Defined *sym, SectionChunk *target, uint32_t targetOffset,
|
||||
int flags)
|
||||
: sym(sym), target(target), targetOffset(targetOffset), flags(flags) {}
|
||||
|
||||
Defined *sym;
|
||||
SectionChunk *target;
|
||||
uint32_t targetOffset;
|
||||
// The Flags field contains the size of the relocation, in bits. No other
|
||||
// flags are currently defined.
|
||||
int flags;
|
||||
};
|
||||
|
||||
// A chunk corresponding a section of an input file.
|
||||
class SectionChunk final : public Chunk {
|
||||
// Identical COMDAT Folding feature accesses section internal data.
|
||||
@ -649,23 +666,6 @@ private:
|
||||
std::vector<RuntimePseudoReloc> relocs;
|
||||
};
|
||||
|
||||
// MinGW specific; information about one individual location in the image
|
||||
// that needs to be fixed up at runtime after loading. This represents
|
||||
// one individual element in the PseudoRelocTableChunk table.
|
||||
class RuntimePseudoReloc {
|
||||
public:
|
||||
RuntimePseudoReloc(Defined *sym, SectionChunk *target, uint32_t targetOffset,
|
||||
int flags)
|
||||
: sym(sym), target(target), targetOffset(targetOffset), flags(flags) {}
|
||||
|
||||
Defined *sym;
|
||||
SectionChunk *target;
|
||||
uint32_t targetOffset;
|
||||
// The Flags field contains the size of the relocation, in bits. No other
|
||||
// flags are currently defined.
|
||||
int flags;
|
||||
};
|
||||
|
||||
// MinGW specific. A Chunk that contains one pointer-sized absolute value.
|
||||
class AbsolutePointerChunk : public NonSectionChunk {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user