llvm-hello-world icon indicating copy to clipboard operation
llvm-hello-world copied to clipboard

Requires changes for LLVM 3.9

Open Grief opened this issue 8 years ago • 7 comments

lli-3.9: test.ll:11:45: error: expected comma after getelementptr's type
        %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0

Grief avatar Nov 18 '16 18:11 Grief

Did someone link to this in a blog or something? I just made this to fix a bug in the LLVM documentation while I was learning the LLVM syntax three years ago. Ended up not using it at the time.

I'll need to set up an LLVM 3.9 environment before I could fix this, but I'm totally open to a pull request to fix that error.

dfellis avatar Nov 20 '16 23:11 dfellis

Replace the line: %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0 By: %cast210 = getelementptr [13 x i8],[13 x i8]* @.str, i64 0, i64 0

I have also deleted the metadata as it did not seem important.

agostini01 avatar Aug 18 '17 15:08 agostini01

Hi @agostini01,

Nice! Do you want to make a pull request to get credit for that, or are you fine with me just implementing that fix?

dfellis avatar Sep 15 '17 16:09 dfellis

haha

You can implement the fix.

Thanks for asking, Have a nice weekend,

Nico

2017-09-15 11:50 GMT-05:00 David Ellis [email protected]:

Hi @agostini01 https://github.com/agostini01,

Nice! Do you want to make a pull request to get credit for that, or are you fine with me just implementing that fix?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dfellis/llvm-hello-world/issues/1#issuecomment-329837521, or mute the thread https://github.com/notifications/unsubscribe-auth/ADkVaS03qRU417nI_pJkPETO_DF8ns1uks5siqrZgaJpZM4K2xq9 .

agostini01 avatar Sep 16 '17 04:09 agostini01

Hey guys, thanks for maintaining this hello world! Here is what I get currently, even with the update form @agostini01 :

lli: ~/llvm/hello.ll:18:6: error: unexpected type in metadata definition
!1 = metadata !{i32 42}

LLVM 3.8.0 Linux 64 bit

exebook avatar Nov 04 '17 13:11 exebook

@exebook I forgot about this (@agostini01's change has not been added, yet), but LLVM has the bad habit of introducing breaking changes in minor releases, so LLVM 3.8.0 is unlikely to be compatible with the LLVM 3.9.0 syntax listed above.

dfellis avatar Nov 06 '17 19:11 dfellis

@dfellis thanks any way for maintaining this, "hello world" that breaks with each release of LLVM is still better than nothing!

exebook avatar Nov 09 '17 12:11 exebook