Skip to content

Commit

Permalink
[MC] Make *ObjectWriter final
Browse files Browse the repository at this point in the history
Summary:
to make it clear that target customization should be done by inheriting
from MCObjectTargetWriter subclasses instead of MCObjectWriter
subclasses.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251094
  • Loading branch information
MaskRay authored and yuxuanchen1997 committed Jul 25, 2024
1 parent 76e8205 commit 2427242
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/MC/MCELFObjectWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class MCELFObjectTargetWriter : public MCObjectTargetWriter {
}
};

class ELFObjectWriter : public MCObjectWriter {
class ELFObjectWriter final : public MCObjectWriter {
unsigned ELFHeaderEFlags = 0;

public:
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MC/MCMachObjectWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class MCMachObjectTargetWriter : public MCObjectTargetWriter {
/// @}
};

class MachObjectWriter : public MCObjectWriter {
class MachObjectWriter final : public MCObjectWriter {
public:
struct DataRegionData {
MachO::DataRegionType Kind;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MC/MCWinCOFFObjectWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MCWinCOFFObjectTargetWriter : public MCObjectTargetWriter {

class WinCOFFWriter;

class WinCOFFObjectWriter : public MCObjectWriter {
class WinCOFFObjectWriter final : public MCObjectWriter {
friend class WinCOFFWriter;

std::unique_ptr<MCWinCOFFObjectTargetWriter> TargetObjectWriter;
Expand Down

0 comments on commit 2427242

Please sign in to comment.