summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-08-03 20:12:58 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-08-03 20:12:58 +0000
commite44a8a7066269b77e6f2ca621fe6b6225abf06c3 (patch)
tree31451ae1ad7c3fb05b191cb0f8aa47d5fc1937fe /llvm/lib/CodeGen
parentadbda4b94c51fafa12471ee81a4d0d8767f2572b (diff)
downloadbcm5719-llvm-e44a8a7066269b77e6f2ca621fe6b6225abf06c3.tar.gz
bcm5719-llvm-e44a8a7066269b77e6f2ca621fe6b6225abf06c3.zip
-Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11
Some functions return concrete ByteStreamers by value - explicitly support that in the base class. (dtor can be virtual, no one seems to be polymorphically owning/destroying them) llvm-svn: 243897
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h b/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
index 0cc829fffc5..df1997bcb72 100644
--- a/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
+++ b/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
@@ -24,16 +24,19 @@
namespace llvm {
class ByteStreamer {
- public:
- virtual ~ByteStreamer() {}
+ protected:
+ ~ByteStreamer() = default;
+ ByteStreamer(const ByteStreamer&) = default;
+ ByteStreamer() = default;
+ public:
// For now we're just handling the calls we need for dwarf emission/hashing.
virtual void EmitInt8(uint8_t Byte, const Twine &Comment = "") = 0;
virtual void EmitSLEB128(uint64_t DWord, const Twine &Comment = "") = 0;
virtual void EmitULEB128(uint64_t DWord, const Twine &Comment = "") = 0;
};
-class APByteStreamer : public ByteStreamer {
+class APByteStreamer final : public ByteStreamer {
private:
AsmPrinter &AP;
@@ -53,7 +56,7 @@ public:
}
};
-class HashingByteStreamer : public ByteStreamer {
+class HashingByteStreamer final : public ByteStreamer {
private:
DIEHash &Hash;
public:
@@ -69,7 +72,7 @@ class HashingByteStreamer : public ByteStreamer {
}
};
-class BufferByteStreamer : public ByteStreamer {
+class BufferByteStreamer final : public ByteStreamer {
private:
SmallVectorImpl<char> &Buffer;
SmallVectorImpl<std::string> &Comments;
OpenPOWER on IntegriCloud