<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 8/20/13 8:43 AM, Rasha Omar wrote:<br>
    </div>
    <blockquote
cite="mid:CACKsOi9aZ5uVcvTd+ps73kjgDiTWtao1rRh3QX-BZP6g0vt7qg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">I have Function<br>
        Function* F;<br>
        and one of its basic blocks BB<br>
        <br>
        I want to insert this BB into a new function without remove it
        from the original<br>
        according that BList is the list of the basic blocks of the
        newFunction<br>
        <br>
        BList.insert(BB);<br>
        <br>
        but I don't want to call BB->removeFromParent(); and without
        this method it give me error that BB is already in a container<br>
        <br>
        is there another function that get copy without deleting?<br>
      </div>
    </blockquote>
    <br>
    I don't think you can share a basic block between functions; you'll
    need to make a copy of the existing block and put it into your new
    function.<br>
    <br>
    There is a CloneBasicBlock() function in
    llvm32/lib/Transforms/Utils/CloneFunction.cpp.  That (or some other
    function in that file) may do what you want.<br>
    <br>
    -- John T.<br>
    <br>
    <blockquote
cite="mid:CACKsOi9aZ5uVcvTd+ps73kjgDiTWtao1rRh3QX-BZP6g0vt7qg@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        Thank you in advance<br>
        <br>
        -- <br>
        <div dir="ltr"><b style="color:rgb(32,18,77)"><span>     </span>Rasha
            Salah Omar<br>
            <span>    </span> Msc Student at E-JUST<br>
            <span>    </span> Demonestrator  at Faculty of Computers and
            Informatics<br>
            <span>    </span> Benha University</b>
          <p
style="color:rgb(32,18,77);font-size:13px;font-family:arial,helvetica,clean,sans-serif;background-color:transparent;font-style:normal"><b><span>    
                e-mail: <a moz-do-not-send="true"
                  href="mailto:rasha.omar@ejust.edu.eg" target="_blank">rasha.omar@ejust.edu.eg</a></span></b></p>
          <font size="4"><span
style="font-family:Arial,Helvetica,sans-serif;font-size:12px;border-collapse:collapse;color:rgb(69,69,69)">
              <div style="padding:0px;display:block;line-height:normal">
                <span
                  style="font-size:20pt;color:rgb(0,176,80);font-family:Webdings">P</span><b><span
style="font-size:11pt;color:rgb(0,176,80);font-family:sans-serif"> Please
                    consider the environment before printing this email.</span></b></div>
            </span></font><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>