Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bolt/include/bolt/Core/Relocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class Relocation {
uint32_t Type;

private:
/// Relocations added by optimizations can be optional.
/// Relocations added by optimizations can be optional, meaning they can be
/// omitted under certain circumstances.
bool Optional = false;

public:
Expand All @@ -72,10 +73,10 @@ class Relocation {
/// Return size in bytes of the given relocation \p Type.
static size_t getSizeForType(uint32_t Type);

/// Some relocations added by optimizations are optional, meaning they can be
/// omitted under certain circumstances.
void setOptional() { Optional = true; }

bool isOptional() { return Optional; }

/// Return size of this relocation.
size_t getSize() const { return getSizeForType(Type); }

Expand Down