<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 10, 2014 at 9:03 AM, Frederic Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: friss<br>
Date: Wed Sep 10 11:03:14 2014<br>
New Revision: 217514<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=217514&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=217514&view=rev</a><br>
Log:<br>
Fix comments of createReplaceableForwardDecl() and createForwardDecl().<br>
<br>
Noticed while trying to understand how the merge of forward decalred types<br>
and defintions work.<br>
<br>
Reviewers: echristo, dblaikie, aprantl<br>
<br>
Subscribers: llvm-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D5291" target="_blank">http://reviews.llvm.org/D5291</a><br>
<br>
Modified:<br>
    llvm/trunk/lib/IR/DIBuilder.cpp<br>
<br>
Modified: llvm/trunk/lib/IR/DIBuilder.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=217514&r1=217513&r2=217514&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=217514&r1=217513&r2=217514&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)<br>
+++ llvm/trunk/lib/IR/DIBuilder.cpp Wed Sep 10 11:03:14 2014<br>
@@ -879,8 +879,7 @@ DIBasicType DIBuilder::createUnspecified<br>
   return DIBasicType();<br>
 }<br>
<br>
-/// createForwardDecl - Create a temporary forward-declared type that<br>
-/// can be RAUW'd if the full type is seen.<br>
+/// createForwardDecl - Create a permanent forward-declared type.<br>
 DICompositeType<br>
 DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope,<br>
                              DIFile F, unsigned Line, unsigned RuntimeLang,<br>
@@ -914,7 +913,7 @@ DIBuilder::createForwardDecl(unsigned Ta<br>
   return RetTy;<br>
 }<br>
<br>
-/// createForwardDecl - Create a temporary forward-declared type that<br>
+/// createReplaceableForwardDecl - Create a temporary forward-declared type that<br>
 /// can be RAUW'd if the full type is seen.<br></blockquote><div><br></div><div>FWIW (either just for your information, or something you can enshrine in a comment): Because this creates a temporary (perhaps we should replace "replaceable" with "temporary") node, it /must/ be RAUW'd at some point, sooner or later. It isn't optional.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 DICompositeType DIBuilder::createReplaceableForwardDecl(<br>
     unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, unsigned Line,<br>
@@ -942,7 +941,7 @@ DICompositeType DIBuilder::createReplace<br>
   MDNode *Node = MDNode::getTemporary(VMContext, Elts);<br>
   DICompositeType RetTy(Node);<br>
   assert(RetTy.isCompositeType() &&<br>
-         "createForwardDecl result should be a DIType");<br>
+         "createReplaceableForwardDecl result should be a DIType");<br>
   if (!UniqueIdentifier.empty())<br>
     retainType(RetTy);<br>
   return RetTy;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>