[PATCH] Replace OwningPtr<T> with std::unique_ptr<T>.

Ahmed Charles acharles at outlook.com
Thu Mar 6 22:14:43 PST 2014

Comment at: include/llvm/Support/StreamableMemoryObject.h:17
@@ -17,1 +16,3 @@
 #include "llvm/Support/MemoryObject.h"
+#include <cassert>
+#include <memory>
Chandler Carruth wrote:
> ? This seems an odd change.
Yes, OwningPtr.h apparently includes <cassert> somehow, but the other includes here don't.

Comment at: include/llvm/Support/YAMLTraits.h:856-857
@@ -855,4 +855,4 @@
   llvm::SourceMgr                  SrcMgr; // must be before Strm
-  OwningPtr<llvm::yaml::Stream>    Strm;
-  OwningPtr<HNode>                 TopNode;
+  std::unique_ptr<llvm::yaml::Stream>    Strm;
+  std::unique_ptr<HNode>                 TopNode;
   llvm::error_code                 EC;
Chandler Carruth wrote:
> I would use clang-format on the diff for this (it has a diff-only processing mode). I usually use it via git-clang-format, but YMMV.
Thanks for the tip about using 'git clang-format'.


More information about the llvm-commits mailing list