Questions tagged [llvm-gcc]

llvm-gcc is a modified version of gcc that compiles C/ObjC programs into native objects, LLVM bitcode or LLVM assembly language, depending upon the options.

llvm-gcc is a modified version of gcc that compiles C/ObjC programs into native objects, LLVM bitcode or LLVM assembly language, depending upon the options.

218 questions
3
votes
1 answer

Compilation issue when using blocks with LLVM GCC 4.2

I wrote a gist a while ago: https://gist.github.com/611157. It compiled and worked ok. I came back to it recently and it no longer complied. I noticed it compiles with LLVM 2.0 with no problems or warnings (and then runs and works!) With LLVM GCC…
Will Johnston
  • 864
  • 4
  • 18
3
votes
1 answer

Internal compiler error: Bus error with LLVM GCC 4.2 compiler

When I am trying to test my application on device with default compiler setting, LLVM GCC 4.2, its giving me "Internal compiler error: Bus error", but it is working OK with GCC 4.2 and LLVM compiler 2.0. What can be the possible reason/reasons for…
itsaboutcode
  • 24,525
  • 45
  • 110
  • 156
3
votes
1 answer

llvm - get users of an instruction

I am trying to get the users of alloca instruction (to basically get the users of a variable). I am using the following code to do so: virtual bool runOnModule(Module &M) { for(Module::iterator F= M.begin(), E = M.end(); F != E; ++F) //…
mikasa
  • 783
  • 1
  • 11
  • 29
3
votes
1 answer

llvm - Pass arguments to a pass

I need to tell the pass to look out for a specific function in the file. And I want to specify which function to look out for 'on the go' i.e when I run the pass. Any idea how I can do that? It's sort of like passing arguments to a function in…
mikasa
  • 783
  • 1
  • 11
  • 29
3
votes
3 answers

llvm-gcc std::allocator bug?

The code: #include #include using namespace std; class blub {}; class intvec : public std::vector >, public blub {}; int main() { std::stack s; } compiles with both g++ (4.4.3) and llvm-g++…
3
votes
2 answers

Compiling SOCAT on Redhat

I am trying to install SOCAT and I am quite lite on C++. So following the instructions HERE I am able to get the latest stable version of 1.7.3.1 downloaded, I get through the ./configure, but when I go into ./make I get the following…
John
  • 763
  • 1
  • 10
  • 21
3
votes
1 answer

Why retain count is diffrent in debug mode and in running mode?

I know that how ARC and MRC works. but I am confuse while testing the below code. I don't know why this happen. Why the retain count is different in debug mode and in running mode for the same question? NSMutableArray *a = [NSMutableArray…
3
votes
1 answer

LLVM -stats option

I am using an individual LLVM optimization pass 'mem2reg' on a simple c-program. opt .bc -mem2reg -instcount -o .bc -stats after executing I see the stats option not showing the statistics collected, and it seems that in order to use…
Phani
  • 71
  • 1
  • 5
3
votes
1 answer

LLVM: bitcode with llvm-gcc (mingw) for windows

i'm currently building a small JIT compiler. For the language I need a runtime library for some special math functions. I think the best would be to compile the lib to bitcode and link it. The compiler should be integrated in a product and as of…
SteffenG
  • 274
  • 2
  • 12
3
votes
2 answers

gcc and llvm linux shutdown function from c code

Linux x86-64 compiling and statically linking with gcc I have: #include if (str[0] == 'r') reboot(0x1234567); but I can't seem to find the equivalent function call for shutdown. I'd also like to know the llvm function if…
Rich Oliver
  • 6,001
  • 4
  • 34
  • 57
3
votes
1 answer

How to Compile and Run llc-3.4 generated C++ code using native compiler(g++)?

Note: Goal of this work is to use some of the c++11 features in non c++11 compiler Following steps are done, Generate llvm bit code, clang++ -emit-llvm -c test.cc -o test.o Convert llvm bitcode to c++ code, llc-3.4 test.o -o test.cpp…
Arunprasad Rajkumar
  • 1,374
  • 1
  • 15
  • 31
3
votes
2 answers

OS X asm C call with return value

I've been playing around with the asm macro in C to directly call some assembly instructions on OS X Mavericks to get a stack pointer address (from %rsp) and I've found really strange behaviour (at least to me) while trying to assign a return value…
Brano H.
  • 33
  • 6
3
votes
4 answers

LLVM MinGW installation on Vista?

From llvm.org I've downloaded llvm-2.6-x86-mingw32.tar.bz2 into c:\llvm and llvm-gcc-4.2-2.6-x86-mingw32-tar.bz2 into c:\llvm-gcc as well as setup a desktop shortcut the following batch file in c:\llvm-gcc which attempts to setup an environment for…
Jon
  • 31
  • 1
  • 3
3
votes
1 answer

Can DragonEgg run an optimization pass available in gcc and produce llvm IR?

Is it possible to run a gcc optimization pass on any code and in the end obtain llvm IR? I want to use dead store elimination available in gcc. I am aware that llvm also has this pass but it is not as advanced as in gcc.
shrm
  • 1,112
  • 2
  • 8
  • 20
3
votes
7 answers

NO such file or directory for the files -----stdarg.h and float.h?

I am using some files on .mm extension in the xcode project for compiling these files we have added the LLVM-GCC 4.2 in the build setting after adding this compiler this showing the error…
B25Dec
  • 2,301
  • 5
  • 31
  • 54