Questions tagged [llvm-clang]

Clang is the C language family front-end for the LLVM compiler. (The C language family includes C, C++, Objective-C, and Objective-C++.)

Clang refers to the C language family front-end for the LLVM (originally known as "low level virtual machine") compiler. The C language family consists of C, C++, Objective-C, and Objective-C++.

High-level features of clang include better compile-time performance than gcc, helpful error and warning messages, and a static analyzer to automatically detect software bugs.

1101 questions
0
votes
2 answers

Issue trying to build LLVM and clang

I'm trying to build LLVM and clang on my machine (Ubuntu 12.04). I followed the instructions on http://clang.llvm.org/get_started.html up to step 6 (build LLVM and clang). When I make, I get a whole load of warnings about potentially incompatibly…
Peter
  • 1,381
  • 2
  • 13
  • 24
0
votes
1 answer

speak.js compiling issues in windows

I'm having this issue when trying to compile speak.js. In emscripten.sh when the compiler reaches this line: $EMSCRIPTEN/emcc -O2 --js-transform "python bundle.py" speak.bc -o speak.raw.js I get this error (previous parts work…
0
votes
1 answer

Clang++ -c outputs files to the wrong directory

I have this makefile target that contains these steps: ... cd $(GRAPHICS_BUILD_DIR) clang++ -c -I$(SFML_HEADERS) $(GRAPHICS_DIR)/*.cpp cd $(BASE_DIR) ... For some reason, Clang outputs the build files into BASE_DIR, not GRAPHICS_BUILD_DIR.…
jepugs
  • 445
  • 4
  • 10
0
votes
1 answer

Multiplying preprocessor constants in Objective - C

Suppose I have the following preprocessor definition #define MYNUMBER 10f; I would then like to use it in my code as follows: float someResult = MYNUMBER * 3; When I do this, Xcode thinks that I am trying to use * as a unary pointer mark instead of…
Andrew Lauer Barinov
  • 5,694
  • 10
  • 59
  • 83
0
votes
1 answer

LLVM and CLANG - general info

I actually require CLANG tool. Please let me know whether I can build CLANG from GCC 4.1.2 or I need to have LLVM. If so, would GCC 4.1.2 build both LLVM and CLANG? Also I need some source-to-source translation (C++ code beautification - inserting…
Programmer
  • 8,303
  • 23
  • 78
  • 162
-1
votes
1 answer

How to call natively supported runtime functions for a compiler written in LLVM?

I am very new to LLVM. I have written a basic compiler using the LLVM bindings for Haskell. The basic compiler works fine. Now I want to enrich this compiler with some natively supported functions in its runtime (written in C) but I am failing to…
Abhiroop Sarkar
  • 2,251
  • 1
  • 26
  • 45
-1
votes
1 answer

Value * -> getName returns empty string LLVM

I am looping over the instructions in a basic block, and the instructions as well as the operands gives an empty name when doing val->getName(). I'm trying to implement available expressions analysis, so I need to figure out how to compare the two…
Conanap
  • 155
  • 1
  • 11
-1
votes
1 answer

Weird Cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' error

I have seen that there are some topics with the "Cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef'" problem solved, but my case is slightly different. I am doing some iOS cross compilation from linux and I have a local…
-1
votes
1 answer

How to print arguments names of printf from LLVM-IR

Can any one please help me in finding the actual argument names of printf() call from LLVM-IR. For example : I am having printf("%d,%d,x,y); statement in program. I am writing LLVM pass for finding actual argument names (x and y in above example).
-1
votes
1 answer

Clang++ does name mangling inspite of extern "C" when using -lstdc++

I build a shared-object using Clang++. The major functions are located in 'extern "C"' block. The building is fine, and I can call these functions using JNA. When I added the flag "-lstdc++" (for using some C++11 features) - I got runtime…
Azriel Berger
  • 160
  • 4
  • 17
-1
votes
1 answer

Cross compile clang for Android arm

I am trying to cross-compile llvm/clang for Android arm. I export the CC/CXX variables to the arm-linux-androideabi cross compilers, and then from my build folder I execute: cmake -G "Unix Makefiles" --target arm-linux-androideabi…
Paschalis
  • 11,929
  • 9
  • 52
  • 82
-1
votes
2 answers

A huge number of linker errors using LLVM c++11 and libc++

I've got a project I'm writing in C++ in Xcode. I wanted to use Smart Pointers, so I changed the C++ Language Dialect to c++11 and the C++ Standard Library to libc++. Now I get a huge number of linker errors when I try and run my project. I'm using…
JamEngulfer
  • 747
  • 4
  • 11
  • 33
-1
votes
1 answer

Segmentation Fault :11

I am getting segmentation fault: 11 Now, char array[10000000] reserves 10000000 bytes or around 9.53 mb so that should not be a problem. What am I doing wrong? Code: #include #define VERSION 0 #define ARRAY_SIZE 10000000 #define…
kalpa
  • 657
  • 2
  • 11
  • 22
-1
votes
1 answer

gcc/clang optimization when de-/serializaing

Some gcc/clang compiler optimizations allow reordering the execution of code in the assembly (e.g. for gcc: -freorder-blocks -freorder-blocks-and-partition -freorder-functions). Is it safe to use such optimizations when de-/serializing data…
tisch
  • 1,098
  • 3
  • 13
  • 30
-1
votes
1 answer

Clang search path file

How to add a path compiler search path? I do not mean-I options. I want to add path permanently to compiler search paths. Is there a file where compiler has saved search paths? I would like to add the path to the header so that the compiler always…
sweet_sugar
  • 1,390
  • 3
  • 13
  • 22
1 2 3
73
74