[llvm-dev] Runtime error

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


(+LLVM-dev)

Your datalayout is invalid.



> On Sep 22, 2016, at 10:18 PM, Varun Patil <varun.patil40 at gmail.com> wrote:
> 
> Thank you for reply. 
> But again problem with test.bc file is as follows,
> COMMAND:
> $ ./llc -view-dag-combine1-dags -march=toy -relocation-model=pic -filetype=asm ~/test.bc 
> ERROR:
> LLVM ERROR: not a number, or does not fit in an unsigned int
> 
> 
> 
> 
> Thanks and Regards
> Varun
> 
> On Fri, Sep 23, 2016 at 10:36 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
> 
>> On Sep 22, 2016, at 9:57 PM, Varun Patil via llvm-dev <llvm-dev at lists.llvm.org <mailto: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/62f085dd/attachment.html>


More information about the llvm-dev mailing list