From 5f67df146bffb10a328bfdeb456a71810aa1ad54 Mon Sep 17 00:00:00 2001 From: Guilherme Leobas Date: Sun, 28 Oct 2018 18:04:44 +0100 Subject: [PATCH] clang: add -emit-llvm example (#2499) --- pages/common/clang.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/clang.md b/pages/common/clang.md index e91ea719a..f2bf73f00 100644 --- a/pages/common/clang.md +++ b/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}}`