llvm-gcc

Difference between LLVM, GCC 4.2 and Apple LLVM compiler 3.1

五迷三道 提交于 2019-12-18 15:33:28
问题 What are the major differences between LLVM GCC 4.2 and Apple LLVM compiler 3.1? I'm fairly new to compilers so any help is appreciated. Also I'm especially interested in how the two compilers could affect game performance. 回答1: The difference is a matter of both technology and speed. CLANG was still young and buggy when Apple began the transition away from GCC's compiler and toolchain, so LLVM was built as a back-end to GCC to facilitate its eventual replacement. So, code went in and was

What is 'llvm-gcc-4.2' doing in '/usr' on my Yosemite system?

我的梦境 提交于 2019-12-13 21:03:20
问题 In /usr on my (migrated) Yosemite system I have some old (2011-12) directories that look out of place to me: /usr/llvm-gcc-4.2 /usr/include/gcc/darwin/4.2 What are these? Are they current; can I get rid of them? I have the latest Xcode and command line tools installed, if that matters. 回答1: They are the Xcode command line tools, but llvm-gcc is no longer used, so it looks like they haven't been cleaned-up from a previous version. I think it's best to leave them alone as I cannot see how they

Xcode 4.2 Code Coverage

主宰稳场 提交于 2019-12-13 12:05:03
问题 I started to use Xcode 4.2 and i have problems with generating code coverage. Xcode 4.2 does not include the GCC 4.2 compiler, but it was replaced with the LLVM GCC 4.2 compiler. The first one was needed to generate code coverage in the previous version of Xcode. I followed the 'tutorial' on CoverStory website, but this results in the following: a) when i do all steps, no coverage files. b) when i link the libprofile_rt.dylib to my project, the test which should fail, do not fail anymore. Did

How to get variable definition line number etc. using dbg metadata?

纵然是瞬间 提交于 2019-12-11 14:36:48
问题 As far as I know, when I need to get the line number of a local variable I had to look for the invocation of the llvm.dbg.declare intrinsics and get the dbg metadata(since AllocaInst itself does not contain any dbg info). However there seems no guarantee that this CallInst is the next instruction of the the AllocaInst , and I have to traverse the instruction in a specified function, which is inefficient. So I'm wondering whether there is a method for AllocaInst to get the llvm.dbg.declare

How to Compile and Run llc-3.4 generated C++ code using native compiler(g++)?

妖精的绣舞 提交于 2019-12-11 02:26:55
问题 Note: Goal of this work is to use some of the c++11 features in non c++11 compiler Following steps are done, Generate llvm bit code, clang++ -emit-llvm -c test.cc -o test.o Convert llvm bitcode to c++ code, llc-3.4 test.o -o test.cpp -march=cpp Getting below error while compiling the llvm generated c++ code using GNU g++ arunprasadr@geekvm:~/works/myex/llvm$ g++ test.cpp test.cpp:3:23: fatal error: llvm/Pass.h: No such file or directory compilation terminated. I even tried adding llvm-dev

Map between LLVM IR instruction and line of source

荒凉一梦 提交于 2019-12-10 13:52:38
问题 How can i store the map between LLVM IR instruction and line of source code if llvm-gcc or dragonegg are used? 回答1: Inside LLVM IR debug information should be used for this purpose. See http://llvm.org/docs/SourceLevelDebugging.html for more info. llvm-gcc (and DragonEgg) will generate everything for you provided that the same information is available on GIMPLE level. 来源: https://stackoverflow.com/questions/5190139/map-between-llvm-ir-instruction-and-line-of-source

No such file or directory after removing a duplicate subdirectory

让人想犯罪 __ 提交于 2019-12-10 12:57:11
问题 My app was building and running fine on the simulator and device, but I noticed that for some reason, I had a duplicate directory within my main directory, and some duplicate files as well. So while my main directory was /MyAppName, there were also files in /MyAppName/MyAppName. I carefully moved any non-duplicate files out of the subdirectory, deleted the directory, and updated the paths for my Prefix Header and Info.plist files. I cleaned and built the project, however I'm still getting an

LLVM equivalent of gcc -D macro definition on commandline

ぃ、小莉子 提交于 2019-12-08 14:43:52
问题 I am looking for LLVM (or clang) equivalent of gcc's -D flag which enables macro definition at commandline. Any pointers would be great. 回答1: From clang --cc1 --help : ... -D <macro> Predefine the specified macro ... As a rule of thumb, assume that Clang emulates GCC, unless proven otherwise! 回答2: The default clang invocation is a gcc-like compiler driver, supporting the same options as gcc, including -D : : ~$ cat test/z.c int foo() { return FOOBAR; } : ~$ clang -DFOOBAR -E -c test/z.c # 1

i have an error when executing “from lxml import etree” in the python command line after successfully installed lxml by pip

…衆ロ難τιáo~ 提交于 2019-12-07 12:18:15
问题 bash-3.2$ pip install lxml-2.3.5.tgz Unpacking ./lxml-2.3.5.tgz Running setup.py egg_info for package from file:///Users/apple/workspace/pythonhome/misc/lxml-2.3.5.tgz Building lxml version 2.3.5. Building with Cython 0.17. Using build configuration of libxslt 1.1.27 Building against libxml2/libxslt in the following directory: /usr/local/lib warning: no previously-included files found matching '*.py' Installing collected packages: lxml Running setup.py install for lxml Building lxml version 2

linker error Assertion failed: (atom->fixupCount() == 1)

本小妞迷上赌 提交于 2019-12-06 04:34:44
Using Xcode 4.0.2 , I have a target that compiles, links, and runs properly in the simulator. However when I compile and link it for an iOS device I get the following (full) linker error: Ld /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos/FrameworkHarness.app/FrameworkHarness normal armv7 cd /Users/mike/src/FOO/FOObar setenv IPHONEOS_DEPLOYMENT_TARGET 4.2 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin