https://bugs.llvm.org/show_bug.cgi?id=49234

            Bug ID: 49234
           Summary: -Xclang -emit-llvm -save-temps tries to parse bitcode
                    as cpp-output, fails
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: jonathanchesterfi...@gmail.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

E.g. https://godbolt.org/z/WWoKeb

-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, https://godbolt.org/z/3zErf7,
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to