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

Install lldb only in llvm

I'm starting to work with llvm infrastructure, and i'm interested in the use of the debugger tool lldb instead of default gdb. I followed the tutorial of installation of clang (Linux System, through svn options) and now wanted to know if is possible…
Natanael Ramos
  • 340
  • 3
  • 10
0
votes
0 answers

How to make llvm IR code run in c?

I want a c program to execute a function using llvm IR instead of the c code. Is it possible? I do not want to convert the entire module. Only one function needs to be called in the end.
ajarmani
  • 269
  • 1
  • 2
  • 9
0
votes
2 answers

Can I use GCC's / LLVM's STL headers with VS?

I am using MSVC++ 2013, and I installed the Clang plugin. However, since I'm using STL, I'm getting bugs like this one: In file included from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\map:6: C:\Program Files (x86)\Microsoft…
rev
  • 1,861
  • 17
  • 27
0
votes
1 answer

clang: compiling with non-flat x86 stack model

If I understand clang assumes that the stack segment for x86 is flat (has 0 base). E.g., when compiling using the following command line: clang -cc1 -S -mllvm --x86-asm-syntax=intel -o - -triple i986-unknown-unknown -mrelocation-model static…
Dmitry K.
  • 1,145
  • 1
  • 9
  • 16
0
votes
2 answers

Apple LLVM 6.0 Error After Changing Architectures

I have been working on reviving an older open source project, and when I updated the architecture from $(ARCHS_STANDARD_32_BIT) to $(ARCHS_STANDARD), Xcode gave me a very long error with the title Apple LLVM 6.0 Error which ended with the line…
Tom Metzger
  • 302
  • 1
  • 3
  • 15
0
votes
0 answers

Avoid LLVM errors in templates when accessing parent template's members

Let's say I have a simple template class like this: template class TParent { public: int Variable; }; template class TChild : public TParent { typedef TParent SUPER; public: void Method() { Variable = 1; }; …
mrzacek mrzacek
  • 308
  • 2
  • 12
0
votes
1 answer

Check for printf in call instruction

%1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str, i64 0, i64 0), i32 7) #3 For the above instruction, how can I check whether the call instruction contains printf ?
Dexter
  • 35
  • 1
  • 7
0
votes
0 answers

Clang c-api total memory usage

How to get total memory usage of clang c-api for a given translation unit? There is clang_getCXTUResourceUsage but it returns memory usage broken into entries where each entry describes certain category. UPDATE1: Documentation states the units of…
Evgeny Timoshenko
  • 3,119
  • 5
  • 33
  • 53
0
votes
0 answers

compiled llvm trunk, no clang present?

I checked out llvm from the svn repository, configure & make. After compilation I can not find clang anywhere. Debug+Asserts/bin has several llvm-x tools, but no clang. What ame I doing wrong? Alex
alex
  • 315
  • 1
  • 11
0
votes
1 answer

LLVM cannot find clang binary

I have just built and installed LLVM Clang 3.5.0 with compiler-rt. clang binary seems to work, but cannot build a simple test program: $ cat hello.c #include int main(int argc, char **argv) { printf("Hello World\n"); return…
smokku
  • 1,256
  • 13
  • 22
0
votes
1 answer

Missing debug metadata in llvm after xcode update

I'm developing some C/C++/Objective C static analysis utility which works with llvm bytecode files. Its basic idea is quite simple: 1. Utility executes clang/clang++ with arguments "-c -emit-llvm -femit-all-decls -g" to generate llvm bytecode file…
okutane
  • 13,754
  • 10
  • 59
  • 67
0
votes
1 answer

LLVM ScalarEvolution Pass Cannot Compute Exit Count for Loop Vectorizer

I'm trying to figure out how to run LLVM's built-in loop vectorizer. I have a small program containing an extremely simple loop (I had some output at one point which is why stdio.h is still being included despite never being used): 1 #include…
0
votes
1 answer

gcov error: Multiple sources for a single basic block

When I invoke gcov as follows it returns the following error message: gcov -a -p dynamic-maps.gcda Multiple sources for a single basic block: /dynamic-maps.cpp != (in…
ksl
  • 4,519
  • 11
  • 65
  • 106
0
votes
0 answers

LLVM getBackedgeTakenCount() behavior

I have the following loop for(i=5;i<5000;i++){ } I am using getBackedgeTakenCount() from Scalar Evolution. The above loop has determinable loop count, then why is the function giving me Cannot Compute? Am I missing something. I have used…
coder hacker
  • 4,819
  • 1
  • 25
  • 50
0
votes
1 answer

llvm: visitInstruction does not visit every instruction in a basic block?

I am trying to write a Simple pass on basic block and the code is as follows: struct SimplePass : BasicBlockPass, InstVisitor { ... some initialisation and some finalization code virtual bool runOnBasicBlock(BasicBlock& B) { …
Bob Fang
  • 6,963
  • 10
  • 39
  • 72