<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <br>
    <br>
    <div class="moz-cite-prefix">On 3/27/20 11:31 PM, Chris Lattner via
      llvm-dev wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:7A86DECF-8038-4FB4-8D82-0467F8D658ED@nondot.org">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <br class="">
      <div><br class="">
        <blockquote type="cite" class="">
          <div class="">On Mar 27, 2020, at 1:55 PM, David Blaikie <<a
              href="mailto:dblaikie@gmail.com" class=""
              moz-do-not-send="true">dblaikie@gmail.com</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <blockquote class="gmail_quote" style="caret-color: rgb(0,
              0, 0); font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; text-decoration: none;
              margin: 0px 0px 0px 0.8ex; border-left-width: 1px;
              border-left-style: solid; border-left-color: rgb(204, 204,
              204); padding-left: 1ex;">That's why I'm also wary of the
              idea of just having use lists empty<br class="">
              for certain types without any other special handling.
              However, I would<br class="">
              argue that if Value::use_begin() etc. contain an assertion
              that fails<br class="">
              when called on one of the value types that don't have use
              lists, then<br class="">
              the Liskov substition principle is de facto not broken. It
              basically<br class="">
              leads to a situation that is as-if Value didn't have use
              lists in the<br class="">
              first place, and only certain sub-types had use lists.<br
                class="">
            </blockquote>
            <div style="caret-color: rgb(0, 0, 0); font-family:
              Helvetica; font-size: 12px; font-style: normal;
              font-variant-caps: normal; font-weight: normal;
              letter-spacing: normal; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              text-decoration: none;" class=""><br class="">
              But it doesn't - it means you write some generic code,
              test it with some cases & looks like it generalizes to
              other cases (you don't want to/can't test generic code
              with all possible generic arguments - that's why
              substitutability is important) then the code breaks when
              it hits a constant Value because it doesn't conform to the
              contract.<br class="">
            </div>
          </div>
        </blockquote>
        <br class="">
      </div>
      <div>David is exactly right.  To say the same thing in another
        way, such a design point would break library based design, one
        of the core principles of LLVM that makes it so powerful.  </div>
      <div><br class="">
      </div>
      <div>To make this explicit, a library that walks use-lists
        internally would have implicit dependencies in its APIs that
        some things are not allowed to be constants.</div>
      <div><br class="">
      </div>
      <div>-Chris</div>
    </blockquote>
    I'm not sure who is removing me from this discussion but please keep
    me CCed to it.<br>
    Thanks,<br>
    Nick<br>
    <blockquote type="cite"
      cite="mid:7A86DECF-8038-4FB4-8D82-0467F8D658ED@nondot.org">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>