Hacker News new | past | comments | ask | show | jobs | submit login

The purpose is to keep optimization flags around if you're, say, compiling with LTO or PGO--cases where the regular compilation process will keep bitcode files around.

The usual trick I do is clang -S -emit-llvm -O2 -Xclang --disable-llvm-passes.

> Clang doesn't take the --print-after-all flag.

You have to prefix it with -mllvm, e.g., clang -mllvm -print-after-all -O2 foo.cpp.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: