[Lldb-commits] [PATCH] D29256: Do not pass non-POD type variables through variadic function

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 1 08:10:31 PST 2017


krytarowski updated this revision to Diff 86644.
krytarowski edited the summary of this revision.
krytarowski added a comment.

Replace SetErrorDescriptionn(errMsg); with SetErrorDescription(errMsg);


Repository:
  rL LLVM

https://reviews.llvm.org/D29256

Files:
  tools/lldb-mi/MICmnBase.cpp
  tools/lldb-mi/MICmnBase.h
  tools/lldb-mi/MIDriver.cpp
  tools/lldb-mi/MIUtilString.cpp
  tools/lldb-mi/MIUtilString.h


Index: tools/lldb-mi/MIUtilString.h
===================================================================
--- tools/lldb-mi/MIUtilString.h
+++ tools/lldb-mi/MIUtilString.h
@@ -30,7 +30,7 @@
 
   // Static method:
 public:
-  static CMIUtilString Format(const CMIUtilString vFormating, ...);
+  static CMIUtilString Format(const char *vFormating, ...);
   static CMIUtilString FormatBinary(const MIuint64 vnDecimal);
   static CMIUtilString FormatValist(const CMIUtilString &vrFormating,
                                     va_list vArgs);
Index: tools/lldb-mi/MIUtilString.cpp
===================================================================
--- tools/lldb-mi/MIUtilString.cpp
+++ tools/lldb-mi/MIUtilString.cpp
@@ -157,7 +157,7 @@
 // Return:  CMIUtilString - Number of splits found in the string data.
 // Throws:  None.
 //--
-CMIUtilString CMIUtilString::Format(const CMIUtilString vFormating, ...) {
+CMIUtilString CMIUtilString::Format(const char *vFormating, ...) {
   va_list args;
   va_start(args, vFormating);
   CMIUtilString strResult = CMIUtilString::FormatPriv(vFormating, args);
Index: tools/lldb-mi/MIDriver.cpp
===================================================================
--- tools/lldb-mi/MIDriver.cpp
+++ tools/lldb-mi/MIDriver.cpp
@@ -509,7 +509,7 @@
     const CMIUtilString errMsg = CMIUtilString::Format(
         MIRSRC(IDS_THREADMGR_ERR_THREAD_FAIL_CREATE),
         CMICmnThreadMgrStd::Instance().GetErrorDescription().c_str());
-    SetErrorDescriptionn(errMsg);
+    SetErrorDescription(errMsg);
     return MIstatus::failure;
   }
 
Index: tools/lldb-mi/MICmnBase.h
===================================================================
--- tools/lldb-mi/MICmnBase.h
+++ tools/lldb-mi/MICmnBase.h
@@ -28,7 +28,7 @@
   bool HaveErrorDescription() const;
   const CMIUtilString &GetErrorDescription() const;
   void SetErrorDescription(const CMIUtilString &vrTxt) const;
-  void SetErrorDescriptionn(const CMIUtilString vFormat, ...) const;
+  void SetErrorDescriptionn(const char *vFormat, ...) const;
   void SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const;
   void ClrErrorDescription() const;
 
Index: tools/lldb-mi/MICmnBase.cpp
===================================================================
--- tools/lldb-mi/MICmnBase.cpp
+++ tools/lldb-mi/MICmnBase.cpp
@@ -122,7 +122,7 @@
 // Return:  None.
 // Throws:  None.
 //--
-void CMICmnBase::SetErrorDescriptionn(const CMIUtilString vFormat, ...) const {
+void CMICmnBase::SetErrorDescriptionn(const char *vFormat, ...) const {
   va_list args;
   va_start(args, vFormat);
   CMIUtilString strResult = CMIUtilString::FormatValist(vFormat, args);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29256.86644.patch
Type: text/x-patch
Size: 2647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170201/b61548fb/attachment.bin>


More information about the lldb-commits mailing list