[PATCH] error_code for dynamically generated error messages

Rui Ueyama ruiu at google.com
Thu May 22 15:45:26 PDT 2014


The idea looks good to me.

================
Comment at: lib/Core/Error.cpp:182
@@ +181,3 @@
+    if (_messages.empty())
+      _messages.push_back("Success");
+    _messages.push_back(msg);
----------------
What is this for?

================
Comment at: lib/Core/Error.cpp:190
@@ +189,3 @@
+  std::vector<std::string> _messages;
+  llvm::sys::SmartMutex<true> _mutex;
+};
----------------
Why don't you use std::mutex and std::lock_guard?

http://reviews.llvm.org/D3881






More information about the llvm-commits mailing list