[llvm] 562c479 - Set ObjectFile's assignment operator to also be deleted like its copy constructor (#93072)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 10:40:16 PDT 2024


Author: Thomas Fransham
Date: 2024-05-22T10:40:13-07:00
New Revision: 562c479c6e953f547f95bf6adfb1b17d4c9976be

URL: https://github.com/llvm/llvm-project/commit/562c479c6e953f547f95bf6adfb1b17d4c9976be
DIFF: https://github.com/llvm/llvm-project/commit/562c479c6e953f547f95bf6adfb1b17d4c9976be.diff

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

Reapply https://github.com/llvm/llvm-project/pull/92942, this time
double checking it compiles. @vgvassilev, @compnerd.

Added: 
    

Modified: 
    llvm/include/llvm/Object/ObjectFile.h

Removed: 
    


################################################################################
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);


        


More information about the llvm-commits mailing list