<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - -Xclang -emit-llvm -save-temps tries to parse bitcode as cpp-output, fails"
   href="https://bugs.llvm.org/show_bug.cgi?id=49234">49234</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Xclang -emit-llvm -save-temps tries to parse bitcode as cpp-output, fails
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jonathanchesterfield@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>E.g. <a href="https://godbolt.org/z/WWoKeb">https://godbolt.org/z/WWoKeb</a>

-Xclang -emit-llvm is passed to the preprocessor invocation, which writes IR
instead of annotated c++. clang -x cpp-output fails to parse IR, error:
expected ';' after top level declarator

Similarly with -Xclang -emit-llvm-bc -save-temps, <a href="https://godbolt.org/z/3zErf7">https://godbolt.org/z/3zErf7</a>,
which rejects 'BC<C0><DE>5<U+0014><U+0000>...' as not being valid UTF-8.

I would guess the fix for this is similar to however -emit-llvm is handled,
since -emit-llvm -save-temps works. -### suggests the -emit-llvm clause is
removed for the preprocessor invocation.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>