llvm / Clang hacking: Part 3

Part 3 in my N-part series on my exploration of hacking on llvm and Clang (c-language) tool chain. Prerequisites This post assumes you’ve successfully completed Part 1 and Part 2 of the series. I’m also going to assume if you’re interested in hacking on Clang, you have an understanding of compilation and are familiar with terms such as lexing, parsing, syntactic analysis, semantic analysis and code generation. If not, then you need to purchase a copy of Compilers: Principals, Techniques and Tools, also known as the Dragon Book and read through it....

Jun 6, 2012 · 6 min

llvm / Clang hacking: Part 2

Part 2 in my N-part series on my exploration of hacking on llvm and Clang (c-language) tool chain. Prerequisites This post assumes you’ve successfully completed Part 1 of the series. Debugging By default, Clang presents a gcc-compatible command-line interface. In most circumstances, this allows Clang to be a drop-in replacement for gcc for rapid testing and easier adoption. When using the gcc interface, Clang spawns a new job to handle the compilation, which prevents debugging the various stages of the compilation process....

Jun 6, 2012 · 2 min

llvm / Clang hacking: Part 1

Part 1 in my N-part series on my exploration of hacking on llvm and Clang (c-language) tool chain. I am running OS X 10.7, however I will try to highlight the steps where you should consider substituting for your platform. Getting Started Follow these steps, with the following exceptions if you prefer git (it is a lot faster); I am using the official llvm mirror on llvm.org. Step 2, substitute the svn command for...

Jun 2, 2012 · 2 min

Objective-C: ternary operator

The ternary operator, also known as a conditional expression is a C construct. What follows is an example used for conditional assignment: result = condition_expression ? true_expression : false_expression; If condition_expression evaluates to true, result will be assigned the true_expression; otherwise, result will be assigned the false_expression. A GNU extension to the ternary operator, also available in Objective-C, is the ability to omit the true_expression as follows: result = first_expression ?...

Mar 15, 2012 · 2 min

Associative References in Objective-C

This is some preamble. ...

Feb 19, 2012 · 2 min