[PATCH] error_code for dynamically generated error messages

Michael Spencer bigcheesegs at gmail.com
Thu May 22 16:44:29 PDT 2014


I suppose this is fine for now as it's a rather simple change. We can just change make_dynamic_error_code in the future.

================
Comment at: lib/Core/Error.cpp:190
@@ +189,3 @@
+  std::vector<std::string> _messages;
+  llvm::sys::SmartMutex<true> _mutex;
+};
----------------
kledzik at apple.com wrote:
> Rui Ueyama wrote:
> > Why don't you use std::mutex and std::lock_guard?
> No good reason.  Why does llvm have is own Mutex if we now use C++11 that has std::mutex?
Historical reasons. For example we should switch to std::error_code eventually.

http://reviews.llvm.org/D3881






More information about the llvm-commits mailing list