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

Error on clang (XCode 5.0.2) with std::functional that has more than three parameter

I'm stuck with a problem considering clang's behavior with c++ std::functional implementation. Well first things first: Here is some code that I'm trying to compile under MacOs Mavericks with XCode 5.0.2 #include #include…
mschmieder
  • 73
  • 8
0
votes
1 answer

Need insights about writing a pass

For my source code, I have the following IR: ; ModuleID = '' @.str = private unnamed_addr constant [9 x i8] c"SOME_ENV_VAR\00", align 1 @.str1 = private unnamed_addr constant [26 x i8] c"Need to set $ENV_Variable.\0A\00", align 1 ;…
t7t0t0t7t
  • 362
  • 3
  • 5
0
votes
2 answers

Changing source code at compilation time (using LLVM)

#include #include int foo(char* a) { char str[10]; if (strlen(a)<10) { sprintf(str,"Yes"); puts(str); return 0; } else { sprintf(str,"No"); puts(str); …
t7t0t0t7t
  • 362
  • 3
  • 5
0
votes
1 answer

LLVM : generating a "ir" file for specifically z80 processor using llvm

I am working on LLVM, and want to generate the files according to specific target architecure e.g-z80. I have downloaded z80 source code and clang. I used --target in clang command to specify z80 but it is not working. can anybody help me out in…
0
votes
0 answers

Config existing project (GCC) with Xcode 5 - LLVM compiler

I have an existing project that has some third party libs are compiled by LLVM-GCC 4.2 compiler Now, I need to compile with Xcode 5 that only supports LLVM 5.0 I just wonder if I can compile third party libs as static library (using LLVM-GCC 4.2)…
Huy Tran
  • 217
  • 5
  • 11
0
votes
0 answers

ARM Assembly walking the frame pointer with clang

I'm compiling some code with Clang 3.3 using -pg on the ARM architecture, and I see that an empty C function: void do_nothing() { } Now looks like: .section .text.do_nothing,"ax",%progbits .globl do_nothing .align 2 .type …
Doug-W
  • 1,318
  • 12
  • 14
0
votes
1 answer

Not able to print correct line numbers for then part of if statement, Clang

In the following code, I am parsing a C-code using clang APIs and then trying to 1)Add a HTML header and footer to the code, so it can be viewed in a browser 2)Getting the line number of THEN part of an IF statement and printing it. I am having…
user763410
  • 502
  • 6
  • 22
0
votes
1 answer

Writing Complete analysis using llvm-clang

I have following tasks that I need to do as part of my research idea: 1. Parse the C file(s) at hand to get llvm-IR. 2. Do analysis on the IR. Possibly add and remove some instructions or BB 3. Emit either x86 executable or C (need to decide…
MacHiry
  • 13
  • 3
0
votes
1 answer

how to compile in xcode 4.6.2 with C++11 enabled

We have a .mm file include < functional > (a std header) and it reports the following error: In file included from…
Tom Fishman
  • 1,716
  • 6
  • 22
  • 36
0
votes
2 answers

Indirection operator on const_iterator error

This code std::ostream& operator<<( std::ostream& output, const Array& a) { if (a.empty()) { output << Structural::BEGIN_ARRAY << Structural::END_ARRAY; } else { output << Structural::BEGIN_ARRAY << std::endl; …
Nathan Wehr
  • 393
  • 7
  • 15
0
votes
1 answer

clang compiler hangs on windows

I have built clang with VS9 following manual. It was built without errors. But when I am trying to compile some code - it hangs (not consuming cycles, two processes), both trunk and 3.2 release: > "bin\clang++.exe" -c test.cpp -o test.bs -emit-llvm…
qble
  • 1,256
  • 2
  • 12
  • 29
0
votes
1 answer

Compiler error with LLVM Xcode Version 4.6.1 (4H512)

Seeing this error when we recently upgrade Xcode to 4.6.1. Was able to compile perfectly prior to this version. Any insight into this message? Seems like a 32/64 bit issue? From looking at LLVM Patch logs it appears that it's an unfortunate…
Brian Liang
  • 7,734
  • 10
  • 57
  • 72
0
votes
2 answers

Apple LLVM Compiler Error 4.1 [invalid deployment target for -stdlib=libc++]

Can Any one Tell me how to solve this Error... My X-Code is Version 4.5. My IOS Simulator is Version 4.3 clang: error: invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later) Command…
0
votes
2 answers

Objective-C code analysis

I want to write a tool that does code-completion for objective-c class-names, selector-names and property names, as the software is being developed. (ie something that can run periodically and build a tree of class names, and their…
Jasper Blues
  • 28,258
  • 22
  • 102
  • 185
0
votes
2 answers

How to compile c99-to-c89 convertor with clang?

I'm trying to compile ffmpeg in windows for VisualStudio and one of the step is to compile c99-to-c89 code with clang according to this post. I managed to create clang.exe but how I compile c99-to-c89 code with it? I changed a little bit the…
theateist
  • 13,879
  • 17
  • 69
  • 109