After upgrading Xcode to SDK 4.1 (the latest official release at that time) all my projects compiled with LLVM 1.5 failed to compile. The build logs showed a lot of weird errors in Objective-C runtime classes, not in any of my code.
Turns out the 4.1 SDK somehow breaks the __IPHONE_OS_VERSION_MIN_REQUIRED macro. There are two solutions available:
Change to any compiler not using LLVM or base SDK 4.1
Set the macro manually: add the following line to ‘Other C Flags’:
-D__IPHONE_OS_VERSION_MIN_REQUIRED=030000.
(Change 030000 to the minimum version you require)
This will ensure you’re projects will compile correctly again using the LLVM compiler using SDK 4.1