← 返回命令列表

Linux command

llvm-as 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Assemble LLVM IR to bitcode

llvm-as [input.ll] -o [output.bc]

Assemble from stdin

cat [input.ll] | llvm-as -o [output.bc]

Check syntax only

llvm-as -disable-output [input.ll]

Output to stdout

llvm-as [input.ll] -o -

说明

llvm-as is the LLVM assembler that reads LLVM assembly language (.ll files) and outputs LLVM bitcode (.bc files). It's the inverse of llvm-dis. The tool converts human-readable LLVM intermediate representation into the binary bitcode format used by other LLVM tools.

参数

-o _filename_
Output filename.
-f
Enable binary on terminal.
-disable-output
Don't write output (syntax check).
--data-layout _layout_
Override data layout string.
--help
Show help.
--version
Show version.

FAQ

What is the llvm-as command used for?

llvm-as is the LLVM assembler that reads LLVM assembly language (.ll files) and outputs LLVM bitcode (.bc files). It's the inverse of llvm-dis. The tool converts human-readable LLVM intermediate representation into the binary bitcode format used by other LLVM tools.

How do I run a basic llvm-as example?

Run `llvm-as [input.ll] -o [output.bc]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o _filename_ do in llvm-as?

Output filename.