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

compiler framework for C code

I am looking for a compiler framework that I can use to write some code optimizations and dataflow analysis for C source code. I know there is LLVM but I would like to work with source code rather than bytecode. I was looking into LLVM-dragonegg but…
JRR
  • 6,014
  • 6
  • 39
  • 59
0
votes
1 answer

Why doesn't LLVM compile typedeffed C blocks in pch file with Xcode?

I have typedeffed a C block type that I use commonly, in my project's PCH file: typedef void (^UserBlock)(PFUser* user); When I try to define an Objective C method in a header like this: +(void)ensureUserWithID:(NSString *)userID…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
0
votes
0 answers

How to Cross Compile a source code using Clang?

I have clang 3.4 installed in my host machine(Ubuntu 12.04 LTS) and trying to cross compile a simple C++11 program to execute in a mips32r1(little endian) + uclibc environment. While trying to cross compile, I'm getting below error,(attached a…
Arunprasad Rajkumar
  • 1,374
  • 1
  • 15
  • 31
0
votes
1 answer

fatal error: 'clang-c/Index.h' file not found on OSX 10.9.4

I was trying to install clang_complete on OSX 10.9.4. However while running make I get the following error: [ 66%] Building CXX object CMakeFiles/clic_add.dir/clic_add.cpp.o /Users/bharat/Desktop/clang_indexer/clic_add.cpp:5:10: fatal error:…
user1715122
  • 947
  • 1
  • 11
  • 26
0
votes
0 answers

Clang & LLVM building for SPARC

I'm writing a little self-educational project. It has to do with Clang and LLVM internals hacking. But while I was investigating the code base and reading documentation, strange things were going on with the build process. What I am trying to do for…
Dmitri K
  • 331
  • 1
  • 12
0
votes
1 answer

associate user data with LLVM instruction nodes

What would be the best way to store custom data with each LLVM instruction node? Say to pass information from one pass to another? It doesn't seem like the instruction class allows users to store arbitrary data?
JRR
  • 6,014
  • 6
  • 39
  • 59
0
votes
1 answer

LLVM - What optimizations frontend has done

I know that frontend (such as llvm-clang or llvm-gcc ) has also done some optimizations from native code to IR level. But what's optimizations that frontend has done ? Is there a list or a document I can check. Thanks.
Sam
  • 4,521
  • 13
  • 46
  • 81
0
votes
1 answer

Use LLVM/Clang to find fclose() calls in an Xcode project

I would like to learn how I might programmatically integrate with LLVM/Clang to find all of the fclose() calls in my Xcode project. I realize I can accomplish this via normal text searching but this is just the first step in a more detailed problem.
RobertJoseph
  • 7,968
  • 12
  • 68
  • 113
0
votes
1 answer

How do I use export to make LLVM_SRC_ROOT equal to /llvm

How do I use export to make LLVM_SRC_ROOT equal to /llvm, which is where my llvm files are located ?? I have looked up export on the WEB, and I have tried to do as stated, but it does not work for me.. I entered ""export $LLVM_SRC_ROOT=/llvm"" and…
user3669853
  • 13
  • 1
  • 3
0
votes
1 answer

getting clang-llvm to work

I am trying to get clang to work at all.. I am re-learning some of Linux again.. So, If this question is too basic, I apologize.. Here is what I have.. I have a Dell 2 core computer, with a Solid State Drive that I have Fedora 20 (x86-64) on.. I…
user3669853
  • 13
  • 1
  • 3
0
votes
1 answer

Exclude specific symbols from dSYM

I'm building an iOS project that includes a sub-project whose symbols I would like exclude from the product's .dSYM DWARF file. The situation is that the sub-project (a static library) contains valuable proprietary code that I would not want an…
MxSagan
  • 123
  • 1
  • 7
0
votes
1 answer

Clang+LLVM static library linking error on Windows - Why would the symbols be different?

After compiling clang and llvm following the instruction on the llvm website I try linking to the built static libs in a test app. All code is built with v110 of the VS toolset. Im getting linker errors of type "error LNK2001" and "error…
0
votes
1 answer

ast generator using clang api

I am a beginner developer. I use clang api version 3.4 in Qt5.2 I did not get to use the api for ast dump. tell me what I'm doing wrong clang-check --version LLVM (http://llvm.org/): LLVM version 3.4 using namespace clang ; using namespace llvm…
0
votes
0 answers

clang++ Name mangling

Anybody knows how to determine what would be the result of name mangling on a c++ function, be it in class or in a global context? For example after compiling the following function string myFunction2(); We will have: __Z11myFunction2v as the…
0
votes
1 answer

Eclipse CDT with llvm's libc++ compilation err under ubuntu?

I can compile and run c++ example in command line like this: clang++ -std=c++11 -stdlib=libc++ Test.cpp But when trying this in eclipse,I got these errors 12:58:18 **** Incremental Build of configuration Debug for project C++Test **** Info:…
Alex Luya
  • 9,412
  • 15
  • 59
  • 91