The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Questions with this tag regarding version 4.0 specific issues.
Questions tagged [llvm-4.0]
15 questions
14
votes
4 answers
Warning "Use of GNU statement expression extension"
I have this Objective-C istruction:
NSRange range = NSMakeRange(i, MIN(a, b));
where a and bare NSUIntegers.
MIN() is the macro defined in the standard NSObjCRuntime.hheader file as:
#if !defined(MIN)
#define MIN(A,B) ({ __typeof__(A) __a = (A);…

Dev
- 7,027
- 6
- 37
- 65
9
votes
2 answers
Literal @YES not working in iOS 5 / Xcode 4.4
New Xcode 4.4 is out and it should support literals like
@42
@"String"
@23.0L
@{ @"key" : obj } and
@[obj1, obj2]
and it should also support @YES and @NO, which isn't working when targeting latest iOS 5 (and prior).
After compiling it show the error…
user207616
4
votes
1 answer
LLVM JIT support for caching compiled output
I am trying to see how to avoid LLVM JIT compilation every time and use the cached copy. I see that LLVM has ObjectCache support for code generation from module, but to get module from a file or code string, it needs to be compiled and go through…

Aana
- 71
- 6
3
votes
1 answer
Getting llvm::LoopInfo from (non-LLVM) code?
For the development of my own Pass I want to write unit tests - i have lots of 'pure' helper methods, so they seem ideal candidates for unit test. But some of them require an instance of llvm::LoopInfo as an argument.
In my (Function-)Pass I just…

5-to-9
- 649
- 8
- 16
3
votes
1 answer
Inline assembly issue with LLVM 4.0
On Xcode 4.4, I have some problems compilling inline assembly on the last LLVM compiler (4.0).
In my inline assembly code, each call to "fldmias" like :
asm volatile(
"fldmias %2, {s4-s19} \n\t"
...
)
give me this error :
Inline assembly…

Gerwoolf
- 33
- 1
- 3
2
votes
1 answer
/usr/lib/x86_64-linux-gnu/libLLVM-4.0.so.1: version `LLVM_4.0' not found
I am trying to run a tool that uses Clang and LLVM. The tool name is cppgrep that is available with the docker. Please find it from the github repository - https://github.com/peter-can-talk/cppnow-2017. I have tried using Ubuntu 16.04 and 17.10, I…

The Voyager
- 617
- 8
- 21
2
votes
0 answers
memory allocate functions in llvm
How to detect malloc and free function calls in a llvm pass and replace it with a new function calls by getting the arguments and return type in llvm?
i.e. Is there a way to create new functions (Malloc and free) and then create function calls…

pavikirthi
- 1,569
- 3
- 17
- 26
2
votes
3 answers
Apple LLVM compiler 4.0 freeze xcode and app when print XML (NSLog)
I update for xcode 4.4 (with Apple LLVM compiler 4.0) and since then when i try to print XML in console the xcode and app (in simulator) block user interaction...and i need wait 30seconds or more until finish (i can't do nothing)
i´m using…

silvaric
- 1,668
- 17
- 27
1
vote
1 answer
Iterating over loops with LoopInfoWrapperPass in LLVM
I am using the LoopInfoWrapperPass to generate Loopinfo, but then I am not able to use Loopinfo to iterate over the loops in my function.
Here is the code. I get a build error while using the 'make' command:
#include "llvm/Pass.h"
#include…

Jaswinder
- 23
- 5
1
vote
1 answer
Uncrustify doesn't support for the new Objective-C syntax of LLVM 4.0
I have used Uncrustify for formatting code.
But Uncrustify doesn't support for the new Objective-C syntax of LLVM 4.0.
What am I going to do?
The Code formated by Uncrustify:
@interface SJTLLVM4Tester()
@property (strong) NSNumber…

jqgsninimo
- 6,562
- 1
- 36
- 30
0
votes
0 answers
Access to the value of an argument to a function invocation in LLVM
In my LLVM IR, I have a number of function invocations that look like this:
%2 = invoke i16 @"_ZN41_$LT$std..sync..mpsc..Sender$LT$T$GT$$GT$4send17h3c94bf47bc6c3500E"(%"std::sync::mpsc::Sender"* dereferenceable(16) %weather_sender,…

Felix Suchert
- 108
- 8
0
votes
0 answers
clang-tidy 4.0 clang-analyzer-alpha.unix.PthreadLock check
Even after I thought that this check was missing, I am now suddenly getting the output of clang-analyzer-alpha.unix.PthreadLock check from the clang-tidy 4.0 tool. Here is a toned down use case of my code which I am trying to modernize by using…

Recker
- 1,915
- 25
- 55
0
votes
1 answer
clang-analyzer-alpha.unix.PthreadLock check missing from clang-tidy version 3.8 and 4.0?
I am trying to modernize my module's C++ source code using clang-tidy. A few weeks ago, I downloaded and built clang and clang tools version 3.9 and when I ran it on one of my cpp files I got clang-analyzer-alpha.unix.PthreadLock saying that lock…

Recker
- 1,915
- 25
- 55
0
votes
1 answer
use '[]' syntax to access containers in XCode 4.4 seems not working
Has anyone tried new syntax sugar introduced in Xcode 4.4 (iOS 5.1), like automatically calls @synthesize or Literal Syntax for NSArray ? They are quite handy.
But I can't get it right for this one , "use '[]' syntax to access". I tried following…

Qiulang
- 10,295
- 11
- 80
- 129
0
votes
2 answers
clang failed with exit code 254 only for iOS device target
I have an ios xcode project, that compile and running fine for simulator but failed to compile for device target.
I am trying to port a QT project to iOS and my project setup is quite complex. The desktop version is totally working fine and I didn't…

Bryan Chen
- 45,816
- 18
- 112
- 143