[llvm-commits] [llvm] r77050 - /llvm/trunk/docs/ReleaseNotes-2.6.html

Daniel Dunbar daniel at zuster.org
Fri Jul 24 22:26:53 PDT 2009


Author: ddunbar
Date: Sat Jul 25 00:26:53 2009
New Revision: 77050

URL: http://llvm.org/viewvc/llvm-project?rev=77050&view=rev
Log:
Ok, "most clients should be unaffected" was a lie. Add notes on upgrading.

Modified:
    llvm/trunk/docs/ReleaseNotes-2.6.html

Modified: llvm/trunk/docs/ReleaseNotes-2.6.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes-2.6.html?rev=77050&r1=77049&r2=77050&view=diff

==============================================================================
--- llvm/trunk/docs/ReleaseNotes-2.6.html (original)
+++ llvm/trunk/docs/ReleaseNotes-2.6.html Sat Jul 25 00:26:53 2009
@@ -460,11 +460,34 @@
 <li><tt>SCEVHandle</tt> no longer exists, because reference counting is no
 longer done for <tt>SCEV*</tt> objects, instead <tt>const SCEV*</tt> should be
 used.</li>
+
 <li>Many APIs, notably <tt>llvm::Value</tt>, now use the <tt>StringRef</tt>
 and <tt>Twine</tt> classes instead of passing <tt>const char*</tt>
 or <tt>std::string</tt>, as described in
 the <a href="ProgrammersManual.html#string_apis">Programmer's Manual</a>. Most
-clients should be uneffected by this transition.</li>
+clients should be unaffected by this transition, unless they are used to <tt>Value::getName()</tt> returning a string. Here are some tips on updating to 2.6:
+  <ul>
+    <li><tt>getNameStr()</tt> is still available, and matches the old
+      behavior. Replacing <tt>getName()</tt> calls with this is an safe option,
+      although more efficient alternatives are now possible.</li>
+
+    <li>If you were just relying on <tt>getName()</tt> being able to be sent to
+      a <tt>std::ostream</tt>, consider migrating
+      to <tt>llvm::raw_ostream</tt>.</li>
+      
+    <li>If you were using <tt>getName().c_str()</tt> to get a <tt>const
+        char*</tt> pointer to the name, you can use <tt>getName().data()</tt>.
+        Note that this string (as before), may not be the entire name if the
+        name containts embedded null characters.</li>
+
+    <li>If you were using operator plus on the result of <tt>getName()</tt> and
+      treating the result as an <tt>std::string</tt>, you can either
+      uses <tt>Twine::str</tt> to get the result as an <tt>std::string</tt>, or
+      could move to a <tt>Twine</tt> based design.</li>
+  </ul>
+</li>
+
+
 <li>llvm-dis now fails if output file exists, instead of dumping to stdout.
 FIXME: describe any other tool changes due to the raw_fd_ostream change.  FIXME:
 This is not an API change, maybe there should be a tool changes section?</li>





More information about the llvm-commits mailing list