Skip to content

Set ObjectFile's assignment operator to also be deleted like its copy constructor #93072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2024

Conversation

fsfod
Copy link
Contributor

@fsfod fsfod commented May 22, 2024

Reapply #92942, this time double checking it compiles. @vgvassilev, @compnerd.

… ctor

This will also fix a warning when ObjectFile is dllexport'ed on Windows.
@llvmbot
Copy link
Member

llvmbot commented May 22, 2024

@llvm/pr-subscribers-llvm-binary-utilities

Author: Thomas Fransham (fsfod)

Changes

Reapply #92942, this time double checking it compiles. @vgvassilev, @compnerd.


Full diff: https://github.com/llvm/llvm-project/pull/93072.diff

1 Files Affected:

  • (modified) llvm/include/llvm/Object/ObjectFile.h (+1)
diff --git a/llvm/include/llvm/Object/ObjectFile.h b/llvm/include/llvm/Object/ObjectFile.h
index 8c868c7643edc..f49763e31a9c7 100644
--- a/llvm/include/llvm/Object/ObjectFile.h
+++ b/llvm/include/llvm/Object/ObjectFile.h
@@ -302,6 +302,7 @@ class ObjectFile : public SymbolicFile {
 public:
   ObjectFile() = delete;
   ObjectFile(const ObjectFile &other) = delete;
+  ObjectFile &operator=(const ObjectFile &other) = delete;
 
   uint64_t getCommonSymbolSize(DataRefImpl Symb) const {
     Expected<uint32_t> SymbolFlagsOrErr = getSymbolFlags(Symb);

@JDevlieghere JDevlieghere merged commit 562c479 into llvm:main May 22, 2024
5 of 6 checks passed
@fsfod fsfod deleted the del_assignment_op branch October 14, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants