[Lldb-commits] [PATCH] D11751: [lldb-mi] Simplify MICmnMIOutOfBandRecord implementation.

Bruce Mitchener bruce.mitchener at gmail.com
Tue Aug 4 05:43:03 PDT 2015


brucem marked an inline comment as done.

================
Comment at: tools/lldb-mi/MICmnMIOutOfBandRecord.cpp:16
@@ +15,3 @@
+static const char *
+MapOutOfBandToText(CMICmnMIOutOfBandRecord::OutOfBand_e veType)
+{
----------------
The style in LLDB itself appears to be to using static file-scope functions when appropriate.

I did the same thing in my previous patch which simplified CMICmnMIResultRecord.

Making this a static function might lead to people prefixing the invocation with the class name, which would be needlessly verbose.  Making it a private member function might also lead to, as it has done to date, to people using member variables for strange reasons rather than passing parameters.

Hopefully, there's no need for the internal implementation details of this class to bleed out into the header file.

================
Comment at: tools/lldb-mi/MICmnMIOutOfBandRecord.cpp:56
@@ +55,3 @@
+static const char *
+MapOutOfBandToToken(CMICmnMIOutOfBandRecord::OutOfBand_e veType)
+{
----------------
As above.

================
Comment at: tools/lldb-mi/MICmnMIOutOfBandRecord.cpp:102
@@ +101,3 @@
+//--
+static CMIUtilString
+BuildAsyncRecord(CMICmnMIOutOfBandRecord::OutOfBand_e veType)
----------------
As above.


http://reviews.llvm.org/D11751







More information about the lldb-commits mailing list