Browse Source

clang: add -emit-llvm example (#2499)

Guilherme Leobas 6 years ago
parent
commit
5f67df146b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      pages/common/clang.md

+ 4 - 0
pages/common/clang.md

@@ -13,3 +13,7 @@
 - Include libraries located at a different path than the source file:
 
 `clang {{input_source.c}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`
+
+- Compile source code into LLVM Intermediate Representation (IR):
+
+`clang -S -emit-llvm {{file.c}} -o {{file.ll}}`