[llvm] r220231 - Add const version of OwningBinary::getBinary
Alexey Samsonov
vonosmas at gmail.com
Mon Oct 20 13:32:47 PDT 2014
Author: samsonov
Date: Mon Oct 20 15:32:47 2014
New Revision: 220231
URL: http://llvm.org/viewvc/llvm-project?rev=220231&view=rev
Log:
Add const version of OwningBinary::getBinary
Modified:
llvm/trunk/include/llvm/Object/Binary.h
Modified: llvm/trunk/include/llvm/Object/Binary.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Binary.h?rev=220231&r1=220230&r2=220231&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/Binary.h (original)
+++ llvm/trunk/include/llvm/Object/Binary.h Mon Oct 20 15:32:47 2014
@@ -140,6 +140,7 @@ public:
OwningBinary<T> &operator=(OwningBinary<T> &&Other);
std::unique_ptr<T> &getBinary();
+ const std::unique_ptr<T> &getBinary() const;
std::unique_ptr<MemoryBuffer> &getBuffer();
};
@@ -165,6 +166,11 @@ template <typename T> std::unique_ptr<T>
return Bin;
}
+template <typename T>
+const std::unique_ptr<T> &OwningBinary<T>::getBinary() const {
+ return Bin;
+}
+
template <typename T>
std::unique_ptr<MemoryBuffer> &OwningBinary<T>::getBuffer() {
return Buf;
More information about the llvm-commits
mailing list