llvm

Compiling with LLVM/Clang causes crash, not GCC 4.2

I'm working on an iPhone app, and I'm having some compiler trouble. Here's the low-down: I am compiling using Xcode 3.2.3, targeting iOS 4.0: my device is a 2nd Gen. iPod touch running iOS 4.0. Compiling with GCC 4.2: works on both the simulator and the device Compiling with LLVM compiler 1.5: works on simulator, but not on device. Com...

configure: error: Building in the source directory is not supported in this release.

I am trying to build the iPhone toolchain under Ubuntu 10.04 and I encountered an error: mohit@mohit-laptop:~/Documents/toolchain/iphone-dev/llvm-gcc-4.0-iphone$ ./configure --enable-llvm=`llvm-config --obj-root` --enable-languages=c,c++,objc,obj-c++ --target=arm-apple-darwin --enable-sjlj-exceptions --with-heavenly=/usr/share/iphon...

Is there Python Clang wrapper in the vein of pygccxml which wraps GCC-XML?

For a long time now I've been using pygccxml to parse and introspect my C++ source code: it helps me to do some clever code-generation during our build process. Recently I've read a lot about the benefits of the LLVM stack, and especially the benefits that the LLVM Clang parser brings to C++ compilation. I am now wondering if there is ...

GCC to LLVM migration tips?

Xcode 4 comes with LLVM. As a casual programmer (i.e. download some open source projects and compile them on a mac via command line), is there any tips for the transition? ...

Got "error: division by zero in #if" in jiffies.h when compiling driver code with llvm-gcc

Hello, I'm trying to use llvm-gcc (llvm version 1.7) to compile a driver program (linux/drivers/net/zorro8390.c) in the linux kernel source code (version 2.6.18.8) for research purpose, but I get a lot of errors from the jiffies.h: bash-3.2$ llvm-gcc -D__GNUCC -E -I../../include zorro8390.c -o test.o In file included from ../../include...

Windows.h and clang (LLVM)

Hi, I'm trying to compile a little project that includes windows.h using the clang compiler. Unfortunately, clang produces some errors I'm not able to resolve. What's causing these errors? Does clang not support all required features, am I missing something? In file included from C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include/w...

Building and code signing an iPhone Application from the command line.

I want to make my iPhone Apps in Emacs now, so without using Xcode at all. How can I build and codesign my app from the command line (even through SSH)? I can't use xcodebuild as there is no Xcode project. Are there any tutorials which cover this? I want to compile them with GCC, and as soon as Developer Tools 4.0 come out, I want to co...

clang cannot find MinimalAction

I get an error when trying to use class MinimalAction in clang. I included Action.h. ...

How to suppress compiler warnings en masse in Xcode.

Within several projects, I am using 3rd party code that produce more than a few compiler warnings. I obviously do not want to go through and modify code of actively updated 3rd party projects. This leaves me with a lot of unnecessary warnings that drown out warnings in MY code. I have used some compiler flags to suppress specific warni...

LLVM Code generation causing seg fault?

I am interested in language creation and compiler construction, and have been working through the example here: http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/. The author was using LLVM 2.6, and after making a couple changes for LLVM 2.7, I got all the code generation code to compile. When feeding the complier the test code,...

Complex structure translation with lazy evaluation

Some background: I am writing a generic high-level to low-level compiler. On the high-level side, it understands classes, methods, fields, virtual method calls, etc. and on the low-level side, it understands functions, structures, arrays, etc. Front-ends translate compiled forms of languages like Java (the main focus) and C# into my IR...

Compile error for the Hello pass example of llvm

Hello all, I was trying the Hello pass example in the "Writing an LLVM Pass" webpage ( http://llvm.org/docs/WritingAnLLVMPass.html#basiccode ). I followed the instructions to compile (with gcc-4.2) the Hello.cpp, but I got the compile errors: Hello.cpp:20: error: expected identifier before string constant Hello.cpp:20: error: expect...

Sun JVMs JIT compiler in comparison to others

Are there any benchmarks or technical comparisons about the different approaches which compare Sun's JVM JIT compiler to LuaJIT2 or the LLVM JIT? For example, a possible framework to compare different JIT engines was presented here. Of course there are many possible ways you can benchmark different JIT compilers. Are there any results? ...

what functions are included in a JVM

What are the functions of the JVM? All I know are: JIT compiler GC memory allocator What are the steps it does when you load a Java application? I am wondering because if I compare the loading time of a Java application with these steps: InitializeNativeTarget on LLVM some GC initialization some Qt/GTK/whatever init some JIT/ahead...

How to implement floor, ceil and round in LLVM bitcode?

Good day overflowers. I'm writing the math functions for a small LLVM-based programming language, and I'm currenly stumped by how to implement the common rounding fuctions floor, ceil and round (to even). Firstly because i haven't found any algorithm descriptions for these functions, secondly because I'm not familiar with what capabilit...

LLVM jit and native

I don't understand how LLVM JIT relating to normal no JIT compile and documentation isn't good. I elaborate example suppose using clang front end: Case 1: I compile C file to native with clang/llvm. This flow I understand is like gcc flow - I get my x86 executable and that runs Case 2: I compile into some kind of LLVM IR that runs on...

Registering extern function with clang's JIT?

Im trying to register an extern function with clangs JIT without success. Heres the function im trying to call: extern "C" int myFunction(int val) { fprintf(stderr, "success!"); return 1; } Heres the code im using to register it: llvm::FunctionType* ft = llvm::FunctionType::get(llvm::Type::getInt32Ty(llvm::getGlobalContext()), ...

How to embed LLVM?

As I understand, the LLVM Core project consists of: Compiler - converts my source code to LLVM IR VM - executes the compiled IR code How can I embed this VM to my C++ application? ...

LLVM automatic C++ linking

In some of the LLVM tutorials I'm seen where it's fairly easy to bind C function into a custom language based on LLVM. LLVM hands the programmer a pointer to the function that can be then be mixed in with the code being generated by LLVM. What's the best method to do this with C++ libraries. Let's say I have a fairly complex library lik...

Is there any way to write a LLVM front end compiler in C#?

Is there any way to write a LLVM front end compiler in C#? ...