llvm

Xcode: LLVM 7.0: Disable warning “Umbrella header for module does not include header”

廉价感情. 提交于 2019-12-21 07:45:32
问题 In order for my Objective-C framework to link successfully in my Swift cocoa touch framework, I had to use this unpretty workaround, which involves importing all framework headers into the project as public headers. I totally don't need all of them appearing in my umbrella header, so I want to somehow remove the bunch of warnings generated. ("Umbrella header for module 'Foo' does not include header"). I went through LLVM warning settings in the build settings, but could not found it. 回答1: If

Xcode “Message from debugger: got unexpected response to k packet: OK”

邮差的信 提交于 2019-12-21 06:59:51
问题 I got this message when testing my app on simulator: Message from debugger: got unexpected response to k packet: OK What does it mean and is my app in any sort of danger? Using Xcode 6.4 & 7.2 回答1: If you look at the file ProcessGDBRemote.cpp in the llvm source code, you will see that this occurs when there is an unexpected response from Xcode's debugger process, in this case if the packet is not the 'W' or 'X' characters: Error ProcessGDBRemote::DoDestroy () { // ... if (m_gdb_comm

When is __lldb_init_module called?

冷暖自知 提交于 2019-12-21 05:12:17
问题 I'm following WWDC session 412 - Debugging in Xcode. There is a demo there about creating custom LLDB summaries for your own classes. I simply can't get the summaries to show up. By inserting print calls in the Python script I have been able to determine that: The script file is getting imported __lldb_init_module is never called Any idea about what could prevent __lldb_init_module from being called? Is there a specific time when you need to import the script? 回答1: For me this worked by

Which libraries do you need to link against for a clang program using blocks

此生再无相见时 提交于 2019-12-21 05:03:34
问题 I've discovered (below) that I need to use -fblocks when compiling code which uses blocks. What library do I need to link against to let the linker resolve _NSConcreteStackBlock? (On Ubuntu 9.10 AMD64.) chris@chris-desktop:~$ clang ctest.c ctest.c:3:25: error: blocks support disabled - compile with -fblocks or pick a deployment target that supports them void call_a_block(void (^blockptr)(int)) { ^ ctest.c:11:19: error: blocks support disabled - compile with -fblocks or pick a deployment

LLVM: simple example of a just-in-time compilation

流过昼夜 提交于 2019-12-21 04:42:32
问题 I'm learning LLVM and trying to compile a simple function: int sum(int a, int b) { return a+b; }; on the fly. So here's the code I have so far: #include <string> #include <vector> #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Verifier.h" using namespace llvm; static LLVMContext &Context = getGlobalContext(); static std::unique_ptr<Module> MyModule = make_unique<Module>("my compiler", Context); Function *createFunc(IRBuilder<>

What platform can I compile binaries for, using LLVM (Low Level Virtual Machine)?

不羁的心 提交于 2019-12-21 04:42:07
问题 I am interested in using the LLVM's Clang compiler. LLVM claims to be cross-platform however it is not clear which platforms can be targeted. I have done quite a lot of Googling on this but there doesn't seem to be much information about LLVM's supported platforms. The only thing I did find was "this" which is kinda confusing. I am not sure if it means I can compile binaries for those platforms using LLVM or if it just runs on those platforms (or both). Could someone who knows more about the

Argument forwarding in LLVM

ぃ、小莉子 提交于 2019-12-21 04:37:08
问题 I need some advice on "forwarding" arguments to a callee (in the LLVM-IR). Suppose I have a function F that is called at the beginning of all other functions in the module. From F I need to access (read) the arguments passed to its immediate caller. Right now to do this I box all arguments in the caller inside a struct and pass a i8* pointer to the struct to F , alongside an identifier telling which caller F is being called from. F has then a giant switch that branches to the appropriate

Is there a way to show where LLVM is auto vectorising?

主宰稳场 提交于 2019-12-21 04:22:08
问题 Context: I have several loops in an Objective-C library I am writing which deal with processing large text arrays. I can see that right now it is running in a single threaded manner. I understand that LLVM is now capable of auto-vectorising loops, as described at Apple's session at WWDC. It is however very cautious in the way it does it, one reason being the possibility of variables being modified due to CPU pipelining. My question: how can I see where LLVM has vectorised my code, and, more

LLVM and compiler nomenclature

China☆狼群 提交于 2019-12-21 03:47:27
问题 I am looking into the LLVM system and I have read through the Getting Started documentation. However, some of the nomenclature (and the wording in the clang example) is still a little confusing. The following terms and commands are all part of the compilation process, and I was wondering if someone might be able to explain them a little better for me: clang -S vs. clang -c (I know what -c does, but how do the results differ?) * (Edit) LLVM Bitcode vs. LLVM IR (what is the difference?) .ll

Is there Python Clang wrapper in the vein of pygccxml which wraps GCC-XML?

时间秒杀一切 提交于 2019-12-21 03:42:45
问题 For a long time now I've been using pygccxml to parse and introspect my C++ source code: it helps me to do some clever code-generation during our build process. Recently I've read a lot about the benefits of the LLVM stack, and especially the benefits that the LLVM Clang parser brings to C++ compilation. I am now wondering if there is any Python interface to Clang such that I could use it as the basis for some of my existing code generation tasks? 回答1: After further digging I found that in