llvm

Can't get rid of Apple LLVM 5.0 Error

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: It keeps saying: fatal error: file '/Applications/Xcode5-DP5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/objc/NSObject.h' has been modified since the precompiled header '/Users/jackiexu/Library/Developer/Xcode/DerivedData/ModuleCache/2MWVPCGUMQ29P/ObjectiveC.pcm' was built note: after modifying system headers, please delete the module cache at '/Users/jackiexu/Library/Developer/Xcode/DerivedData/ModuleCache/2MWVPCGUMQ29P' 1 error generated. I must have deleted the derived data at least five

What does the clang -cc1 option do?

孤者浪人 提交于 2019-12-03 02:42:15
问题 I'm a newbie in clang . I have read a paper about source to source transformation from cuda to opencl using clang compiler front end. Can anyone tell me why the option -cc1 is sometimes used? 回答1: The Clang compiler front-end has several additional Clang specific features which are not exposed through the GCC compatibility driver interface. The -cc1 argument indicates that the compiler front-end is to be used, and not the driver. The clang -cc1 functionality implements the core compiler

Error when using CMake with LLVM

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So I'm trying to build a toy compiler using LLVM and I'd like to use CMake as my build system. I tried using the sample CMakeLists.txt from LLVM's website, but I encounter the following error when running cmake : CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:178 (include): include could not find load file: /usr/share/llvm/cmake/LLVMExports.cmake Call Stack (most recent call first): CMakeLists.txt:4 (find_package) CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:181 (include): include could not find load file: /usr/share

Convert to ARC - LLVM compiler 3.0 Error

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I opened up an older project of mine and chose Convert to Objective-C ARC from the Edit/Refactor menu. I am getting the following error: Apple LLVM compiler 3.0 Error Error in format of file: /Users/myUserName/Library/Developer/Xcode/DerivedData/ProjectName-fkjvtdsoypoyrdcedtarbtypupor/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/ProjectName-arc.migrate/remap Is this one of those situations where I need to manually delete some files/folders in Finder and then try it again? I just deleted everything in the "Build"

__attribute__ ((deprecated)) does not work on objective-c protocol methods?

大城市里の小女人 提交于 2019-12-03 02:25:53
I need to deprecate a single method in objective-c protocol. On normal class/instance methods I add __attribute__ ((deprecated)); after declaration. It seems, that it does not work on protocol methods. If I mark them deprecated and use them somewhere the project compiles OK, without expected deprecation warning. Is it a flaw in Apple LLVM 3.1, or am I doing something wrong? Although the answers here provide some very good information, they are outdated. Starting with Xcode 5.0 and LLVM 5.0 it looks like deprecation warnings for Objective-C protocol methods are recognized. When implementing the

How to use Clang as a compiler with Qt Creator on Windows?

情到浓时终转凉″ 提交于 2019-12-03 02:11:53
I've installed Qt SDK with Qt Creator on my Windows 7. LLVM & Clang installed as well. CMake was already installed. Afterwards added Clang as a compiler into: Tools -> Options... -> Build & Run -> Compilers Then I've created Clang kit. However while creating new project (simple console application) I've no ability to choose Clang kit. There are only autodetected MSVC kits. Maybe the problem is that "Qt version" in Clang kit is empty. But where to get qmake for it? You should also have an appropriate compiled Qt library with Clang. There is no Clang build of Qt for Windows in the download page.

getting c++11 - compliant compiler

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This all seems like a colossal mess. All I want is a compiler that implements C++11, so I can use . But I'm so confused from the very beginning. Currently, I build programs by invoking G++, but when I check the version via $ g++ -v , I get: gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) What's going on? Am I using G++? GCC? LLVM? I don't even know. Are they the same thing? So now I'm trying to build and download GCC 4.7 via gnu.org , but I have no idea what any of the guides are talking about. I've never seen so

Dump IR after each llvm optimization (each pass), both llvm ir passes and backend debugging

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to find some debugging options for clang/LLVM which work like gcc's -fdump-tree-all-all -fdump-rtl-all-all -fdump-ipa-all-all . Basically I want to have an LLVM IR dumps before and after each optimization pass, also it can be useful to have all dumps of AST from clang and all phases of code generation (backend phases, Selection DAG, ISEL-SDNode, register allocation, MCInsts). I was able to find only the clang's -ccc-print-phases , but it will only print high-level phases names, e.g. preprocess-compile-assemble-link; but no any dump of

How do I get back c++0x/c++11 support for Mac OS X 10.6 deployment using Xcode 4.6.2 thru 7.1.1

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I heavily use the c++0x/c++11 features in my project, particularly code blocks and shared pointers. When I upgraded my OS to 10.8 Mountain Lion (Edit: From 10.7), I was forced to upgrade Xcode. In upgrading Xcode, I lost the ability to compile my c++ project for deployment on 10.6 systems as I get the following error. clang: error: invalid deployment target for -stdlib=libc++ (requires Mac OS X 10.7 or later) It appears that Apple is trying to force people to upgrade by not allowing developers to support Snow Leopard. This makes me angry.

Call LLVM Jit from c program

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have generated a bc file with the online compiler on llvm.org, and I would like to know if it is possible to load this bc file from a c or c++ program, execute the IR in the bc file with the llvm jit (programmatically in the c program), and get the results. How can I accomplish this? 回答1: Here's some working code based on Nathan Howell's: #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace llvm; int main() { InitializeNativeTarget(); llvm_start_multithreaded();