ldrumm updated this revision to Diff 82334.
ldrumm added a comment.

switched to the new llvm::Format API


https://reviews.llvm.org/D28028

Files:
  source/Interpreter/Args.cpp
  source/Plugins/ExpressionParser/Clang/IRForTarget.cpp


Index: source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
===================================================================
--- source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -513,8 +513,8 @@
  default:
    encoding_flags = 0x0600; /* fall back to 0x0600, kCFStringEncodingASCII */
    if (log) {
-     log->Printf("Encountered an Objective-C constant string with unusual "
-                 "element size %llu",
+     log->Format("Encountered an Objective-C constant string with unusual "
+                 "element size {0}",
                  string_array->getElementByteSize());
    }
  }
Index: source/Interpreter/Args.cpp
===================================================================
--- source/Interpreter/Args.cpp
+++ source/Interpreter/Args.cpp
@@ -213,10 +213,9 @@
   int i = 0;
   for (auto &entry : m_entries) {
     s.Indent();
-    s.Printf("%s[%zi]=\"%*s\"\n", label_name, i++, int(entry.ref.size()),
-             entry.ref.data());
+    s.Format("{0}[{1}]=\"{2}\"\n", label_name, i++, entry.ref);
   }
-  s.Printf("%s[%zi]=NULL\n", label_name, i);
+  s.Format("{0}[{1}]=NULL\n", label_name, i);
   s.EOL();
 }
 


Index: source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
===================================================================
--- source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -513,8 +513,8 @@
  default:
    encoding_flags = 0x0600; /* fall back to 0x0600, kCFStringEncodingASCII */
    if (log) {
-     log->Printf("Encountered an Objective-C constant string with unusual "
-                 "element size %llu",
+     log->Format("Encountered an Objective-C constant string with unusual "
+                 "element size {0}",
                  string_array->getElementByteSize());
    }
  }
Index: source/Interpreter/Args.cpp
===================================================================
--- source/Interpreter/Args.cpp
+++ source/Interpreter/Args.cpp
@@ -213,10 +213,9 @@
   int i = 0;
   for (auto &entry : m_entries) {
     s.Indent();
-    s.Printf("%s[%zi]=\"%*s\"\n", label_name, i++, int(entry.ref.size()),
-             entry.ref.data());
+    s.Format("{0}[{1}]=\"{2}\"\n", label_name, i++, entry.ref);
   }
-  s.Printf("%s[%zi]=NULL\n", label_name, i);
+  s.Format("{0}[{1}]=NULL\n", label_name, i);
   s.EOL();
 }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to