With Objective-C, you can add iVars/properties to a class using the associated object support in the runtime.
With LLVM 2, you can now add iVars/properties to a class by declaring them in a class extension.
Is there a difference between the two? I have a feeling that LLVM just wraps the runtime support, but I’m not sure.
I believe these are two different mechanisms.
Under the fragile ABI the associated object support was the only way to extend interface, it works (I believe) at runtime by allocating additional list of associated objects.
But now with LLVM 2 you can declare ivars in class extensions, but it works only under the non-fragile ABI (try to compile that code for 32bit Leopard with fragile ABI, and you’ll catch syntax errors).
Here’s an article explaining how the non-fragile ABI works. It requires both the compile time and runtime support.