r244831 - Wdeprecated: CGBuilderInserter is copy constructed in some contexts - remove the unnecessarily disabling copy assignment to enable this
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 12 16:16:55 PDT 2015
Author: dblaikie
Date: Wed Aug 12 18:16:55 2015
New Revision: 244831
URL: http://llvm.org/viewvc/llvm-project?rev=244831&view=rev
Log:
Wdeprecated: CGBuilderInserter is copy constructed in some contexts - remove the unnecessarily disabling copy assignment to enable this
The object has very simple state, there seems no reason to disallow all
the usual value semantic operations.
Modified:
cfe/trunk/lib/CodeGen/CGBuilder.h
Modified: cfe/trunk/lib/CodeGen/CGBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuilder.h?rev=244831&r1=244830&r2=244831&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuilder.h (original)
+++ cfe/trunk/lib/CodeGen/CGBuilder.h Wed Aug 12 18:16:55 2015
@@ -22,9 +22,9 @@ class CodeGenFunction;
/// instructions.
template <bool PreserveNames>
class CGBuilderInserter
- : protected llvm::IRBuilderDefaultInserter<PreserveNames> {
+ : protected llvm::IRBuilderDefaultInserter<PreserveNames> {
public:
- CGBuilderInserter() : CGF(nullptr) {}
+ CGBuilderInserter() = default;
explicit CGBuilderInserter(CodeGenFunction *CGF) : CGF(CGF) {}
protected:
@@ -33,9 +33,7 @@ protected:
llvm::BasicBlock *BB,
llvm::BasicBlock::iterator InsertPt) const;
private:
- void operator=(const CGBuilderInserter &) = delete;
-
- CodeGenFunction *CGF;
+ CodeGenFunction *CGF = nullptr;
};
// Don't preserve names on values in an optimized build.
More information about the cfe-commits
mailing list