Skip to content

Commit 4277255

Browse files
[BOLT] Add getter for optional relocations (#133085)
Minor refactoring on comments.
1 parent b6569cc commit 4277255

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bolt/include/bolt/Core/Relocation.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class Relocation {
5757
uint32_t Type;
5858

5959
private:
60-
/// Relocations added by optimizations can be optional.
60+
/// Relocations added by optimizations can be optional, meaning they can be
61+
/// omitted under certain circumstances.
6162
bool Optional = false;
6263

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

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

78+
bool isOptional() { return Optional; }
79+
7980
/// Return size of this relocation.
8081
size_t getSize() const { return getSizeForType(Type); }
8182

0 commit comments

Comments
 (0)