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
1 answer

`which`, `gcc` not behaving as expected

I have a nearly fresh mac High Sierra installation. I installed gcc 4.9 with homebrew, and now I want to make sure that's the default gcc (not clang). So I typed the following commands and got the following outputs. And they make no sense to me.…
Asker
  • 105
  • 8
0
votes
2 answers

How to get which pointer points to a specific object in c/c++?

I want to know which pointers point to a specific object at runtime in c/c++. For example, I have an object A, now I want to do something for A, such as changing the memory address of A, at this moment I have to know there are how many pointer…
Aries_Liu
  • 95
  • 1
  • 10
0
votes
1 answer

Conditional statement parsing in yacc

I am writing an llvm code generation demo for a certain language which includes if statement. Here are the rules and the actions corresponding to my question: IfStatement : IF CondExpression THEN Statement …
Rational Rose
  • 73
  • 1
  • 10
0
votes
0 answers

execute linux commands in llvm pass

Is there any way to execute linux commands in llvm pass and parse the objdump in it. For example in python we can do as follows: os.system('gcc example.c -o example') os.system('objdump -o example > parsed.txt') and parse it by using regular…
sephora
  • 21
  • 1
  • 7
0
votes
0 answers

LLVM - convert const void * to LLVMValRef

I need to cast const void * to LLVMValRef ,like this const void * context; args[0] = LLVMCastPtrToBoolType((void *) context); I get the following warning. warning: cast from type ‘const void*’ to type ‘void*’ casts away qualifiers
Pradeep
  • 23
  • 8
0
votes
1 answer

LLVM undefined reference to llvm::createDemoteRegisterToMemoryPass

I'm working on OLLVM (https://github.com/obfuscator-llvm/obfuscator), which is an obfuscation project based LLVM. I'm getting the error message above when trying to use reg2mem pass in my own pass. The code is as blow. struct MyPass : public…
Andy Wang
  • 38
  • 6
0
votes
1 answer

How to debug a jitted functiion in llvm?

I want to debug a jit function. just like the source code below , I want to debug the FibF function , but when I debug it by gdb , it seems can't run into the function scope. How to debug it? thank you in advance. // We are about to create the…
richardzhu
  • 41
  • 5
0
votes
0 answers

Not able to use C++14 features( bind,lambdas,etc and getting C++11extension warning) after installing gcc49?

It shows that gcc49 is active: $ port select --list gcc Available versions for gcc: mp-gcc49 (active) none but version is still 4.2.1, $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr…
vedaanta
  • 31
  • 1
  • 10
0
votes
1 answer

GCC option to specify the filename which is being compiled

Assume there are 3 files which I need to compile, a.cpp, b.cpp and c.cpp. When I compile the above 3 files using microsoft compiler, the compiler outputs the file name which it completed compiling. ex: cl a.cpp b.cpp c.cpp a.cpp b.cpp c.cpp But GCC…
0
votes
1 answer

LLVM passes 0 as argument to external function call

Ok, maybe somebody can help me. I am writing a small LLVM IR testprogram: ; ModuleID = 'main' target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-cygwin" define i32 @my_main() { entry: %0 = alloca i64 store…
Rick
  • 680
  • 1
  • 7
  • 20
0
votes
1 answer

dyld: Library not loaded: @rpath/libxcrun.dylib referenced from xcrun

I'm relatively new to mac and now trying to setup a dev. environment for Cordova based iOS app. I'm using Yosemite 10.10.3 I've installed xcode 6.3.1 and the commandlinetools for 6.3.1, under /Applications/Xcode.app/Contents/Developer/ I can see…
Hunter
  • 1
  • 3
0
votes
1 answer

LLVM configuration error

I want to compile llvm on MIPS, but when I run the script configure there is a warning, configuring llvm for an unknown target architecture and I think this warning will lead some errors, why the configure can not recognize the architecture? I'm…
wangxf
  • 160
  • 1
  • 11
0
votes
2 answers

What is 'llvm-gcc-4.2' doing in '/usr' on my Yosemite system?

In /usr on my (migrated) Yosemite system I have some old (2011-12) directories that look out of place to me: /usr/llvm-gcc-4.2 /usr/include/gcc/darwin/4.2 What are these? Are they current; can I get rid of them? I have the latest Xcode and command…
orome
  • 45,163
  • 57
  • 202
  • 418
0
votes
0 answers

compile 32bit dylib in 64bit osx

I am trying to compile dynamic lib in Mac OS X Mavericks, but when I try to link it, it says: Undefined symbols for architecture i386: "operator new(unsigned long, int, char const*, int)", referenced from: ... ld: symbol(s) not found for…
Borzh
  • 5,069
  • 2
  • 48
  • 64
0
votes
1 answer

Undefined symbols for architecture x86_64 on Mac OS X when compiling using LLVM

I am trying to make the compiler in this project using LLVM shipped in Mac OS X Yosemite and getting the following error mentioned in this Issue on Github https://github.com/lsegal/my_toy_compiler/issues/17 When running the make all command, it…
Encore PTL
  • 8,084
  • 10
  • 43
  • 78