s/DebugInfoEnumerator/DebugInfoFinder/g
[oota-llvm.git] / docs / ReleaseNotes-2.6.html
index f1b8852fe016ec119e59a81932405c01e7abd7a5..86d8e4f9e228a5fd1dfb1b84a28083b3e6429a02 100644 (file)
@@ -460,8 +460,50 @@ API changes are:</p>
 <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 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>
+
+    <li><tt>isName()</tt> should be replaced with comparison
+      against <tt>getName()</tt> (this is now efficient).</tt>
+  </ul>
+</li>
+
+<li>The registration interfaces for backend Targets has changed (what was
+previously TargetMachineRegistry). For backend authors, see the <a href="WritingAnLLVMBackend.html#TargetRegistration">Writing An LLVM Backend</a> guide. For clients, the notable API changes are:
+  <ul>
+    <li><tt>TargetMachineRegistry</tt> has been renamed
+      to <tt>TargetRegistry</tt>.</li>
+
+    <li>Clients should move to using the <tt>TargetRegistry::lookupTarget()</tt>
+      function to find targets.</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</li>
+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>
 <li>temporarely due to Context API change passes should call doInitialization()
 method of the pass they inherit from, otherwise Context is NULL.
 FIXME: remove this entry when this is no longer needed.<li>