Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

llvm-c/Target.h can not compile with Visual Studio in C #6160

Open Quuxplusone opened 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR5675
Status NEW
Importance P normal
Reported by baptiste.lepilleur@gmail.com
Reported on 2009-12-03 02:15:06 -0800
Last modified on 2009-12-23 19:38:12 -0800
Version 2.6
Hardware PC Windows XP
CC clattner@nondot.org, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments llvm-c-msvc.patch (1449 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 3909
Patch to remove inline keyword

llvm-c/Target.h fails to compile with Visual Studio when compiling in C mode
due to the usage of the inline keyword (C99 specific I think).

I run into this while trying to compile llvm-py python extension.

I solved this by removing the inline keyword. As the function are static this
compile correctly.
Quuxplusone commented 14 years ago

Attached llvm-c-msvc.patch (1449 bytes, text/plain): Patch to remove inline keyword

Quuxplusone commented 14 years ago

unfortunately, this patch will lead to "static function defined but never used" warnings on other compilers. We need to turn off inline just for VC++.