0

I need a flag for the clang compiler that prints the IR code generated on the front end.

  • 1
    Possible duplicate of [How to make clang compile to llvm IR](https://stackoverflow.com/questions/9148890/how-to-make-clang-compile-to-llvm-ir) – Daniel Nguyen Oct 19 '19 at 03:05
  • To print the result to the screen rather than into a file, you can use `-o -`. – sepp2k Oct 19 '19 at 09:18

1 Answers1

0

To print the IR into the stdout you can use:

clang -S -emit-llvm -o - file.c
Kaio
  • 1
  • 2