[llvm-dev] Runtime error

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 22 22:06:25 PDT 2016


> On Sep 22, 2016, at 9:57 PM, Varun Patil via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi Developer,
> 
> I have wrote simple program called test.c as follows.
> int a, b;
> int main() {
> a=10;
> b=10;
> return a+b;
> }
> 
> Compiled with clang command to produce test.ll file which is attached below,
> $clang -cc1 test.c -emit-llvm
> 
>  Now If I want to run with my own target for selection with llc with command as follow getting error,
> COMMAND:
> $ ./llc -view-dag-combine1-dags -march=toy -relocation-model=pic -filetype=asm ~/test.ll 
> ERROR:
> ./llc: /home/varun/test.ll:14:18: error: expected comma after load's type
>   %2 = load i32* @a, align 4

The clang you’re using is not the same version as the llc you built.
It seems quite older.
You’ll be more successful with:

clang -c -emit-llvm test.c -o test.bc


— 
Mehdi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160922/0dcaa6ba/attachment.html>


More information about the llvm-dev mailing list