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
0
votes
2 answers

llvm-gcc Error:Incompatible plugin

I am new to llvm.When I try to compile c programs using llvm-gcc i get following error: $ llvm-gcc test.c Incompatible plugin version cc1: error: Fail to initialize plugin /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/plugin/dragonegg.so I am using…
shashikiran
  • 369
  • 1
  • 5
  • 17
0
votes
1 answer

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am new to LLVM. I am using Clang 3.0 to execute c programs. I am using mandriva spring 2010. GCC version 4.4.1 is installed in the system. I used the following link to install LLVM. svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm I run it…
Adarsh Konchady
  • 2,577
  • 5
  • 30
  • 50
0
votes
0 answers

Need to understand instruction ldrvsb and ldrbvs instruction do

I am trying to understand below code: ldrvsb r3, [r1], #1 // V set ldrcsh r4, [r1], #2 // C set ldreq r5, [r1], #4 // Z set strvsb r3, [r0], #1 strcsh r4, [r0], #2 streq r5, [r0], #4 ldmmiia r1!, {r3-r4} // N set stmmiia r0!,…
Sandeep Kumar
  • 336
  • 1
  • 3
  • 9
0
votes
0 answers

If I am building an OS, does it make sense for me to use my host OS's gcc compiler?

I am following the tutorial at https://littleosbook.github.io/ and wanted to understand whether or not what I have currently working is conceptually correct. In terms of where I am at, I am using macOS 10.15.7 for the development and was able to…
0
votes
1 answer

Inline functions and link time optimizations

I am trying to study the effects of inlining and link-time optimization currently I am trying to link two files with one of them having an explicit inline function call below are the files: test.c void show(int *arr,int n ){ for(int…
lava_07
  • 83
  • 1
  • 7
0
votes
0 answers

How can we get the program counter address using LLVM compiler?

I am trying to write an LLVM pass which would pass the program counter as an argument. However, I am not sure as to which command or how exactly one can get the program counter address using the llvm classes.
0
votes
2 answers

LLVM GCC 4.2 EXC_BAD_ACCESS

Below code runs just fine on GCC 4.2 but fails with EXC_BAD_ACCESS in LLVM GCC 4.2 - (double_t)readDouble { double_t *dt = (double_t *)(buffer+offset); double_t ret = *dt; // Program received signal: EXC_BAD_ACCESS offset += 8; …
0
votes
1 answer

LLVM Pass - Issues replacing a GlobalVariable

I am trying to write an LLVM pass which manipulates strings. After iterating all the GlobalVariable objects and picking out the strings, I get the string data, perform the manipulation, create a new GlobalVariable and then use replaceAllUsesWith()…
ben_re
  • 518
  • 2
  • 12
0
votes
1 answer

Why XCode 4.0 Compiler Doesn't Report Line Numbers On Errors?

So, I'm trying to create a cross platform project by having a projects directory for my multiple platforms and a source directory where I will be keeping all of my source files used by the multiple projects. Something that just came up with XCode is…
kidnamedlox
  • 806
  • 1
  • 7
  • 14
0
votes
1 answer

Clang error: Cannot compile builtin function

I'm compiling a code which has GCC library extra separately added. While compiling it with clang error cannot compile is showing I've tried added flags. -std=89gnu does not work with a clang. After some inspection found the same function in…
0
votes
1 answer

Error when building llvm x-ray instrument

Following the instructions from llvm XRay instrument guide, I am stuck on the part cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS_RELEASE="-fxray-instrument" -DCMAKE_CXX_FLAGS="-fxray-instrument" \ as it is giving me c++:…
sophia
  • 1
  • 1
0
votes
1 answer

How to I make an iPad app compile on a device using LLVM GCC?

I have my application set up to use the LLVM GCC 4.2 in Target>Build Settings under Compiler Version and it worked for the simulator. When I switched my "Scheme" to target an iPad, it threw the same warnings as I was getting when using GCC, so I'm…
AndrewKS
  • 3,603
  • 2
  • 24
  • 33
0
votes
1 answer

llvm - fastest way to check if two files of code (.ll) are the same

Is it possible to write a pass that can check if two .ll files are same or not? And if they're not, then give a value of how different they are?
mikasa
  • 783
  • 1
  • 11
  • 29
0
votes
1 answer

llvm - delete a function from a file

I have a file in which the main function calls three test functions, namely, test 1, test 2 and test 3. I want to make a pass that deletes each two of the functions one by one and returns the file that's calling only one of the three test functions.…
mikasa
  • 783
  • 1
  • 11
  • 29
0
votes
1 answer

Printing integer in x86 assembly

I am trying to print an integer in 32 bit x86 assembly on macOS High Sierra using this code: .cstring STR_D: .asciz "%d" .globl _main _main: movl $53110, %edi #moves constant int into register sub $8, %esp #make space on stack …
toby_p
  • 11
  • 4