[PATCH] D31233: [XRay][compiler-rt] Remove dependency on <system_error>
Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 16:09:16 PDT 2017
kpw added a comment.
I'm a bit late to the party, but LGTM. I agree with Martin that this is preferable to the old revision in terms of clarity. "return BufferQueue::ErrorCode::Ok" beats "return {}" for reading in my book.
================
Comment at: compiler-rt/trunk/lib/xray/tests/unit/buffer_queue_test.cc:84-86
+ while (true) {
+ auto EC = Buffers.getBuffer(B);
+ if (EC != BufferQueue::ErrorCode::Ok)
----------------
No action required here. Just a general style question.
enum class is sometimes annoying by removing the implicit cast to numeric.
For something like error codes, having the implicit cast is so natural.
What do you think of constructs where you still get scoping and implicit cast like:
class Errorcodes { enum Error { OK = 0, ... }; };
or similar with a namespace instead of a class?
Repository:
rL LLVM
https://reviews.llvm.org/D31233
More information about the llvm-commits
mailing list