fix problems with test/sema/Cocoa.m etc on non-apple machines.

llvm-svn: 43067
This commit is contained in:
Chris Lattner 2007-10-17 06:04:46 +00:00
parent 693cbeadff
commit 253023b25f
1 changed files with 4 additions and 0 deletions

View File

@ -55,8 +55,12 @@ namespace {
class DarwinTargetInfo : public TargetInfoImpl {
public:
virtual void getTargetDefines(std::vector<char> &Defs) const {
// FIXME: we need a real target configuration system. For now, only define
// __APPLE__ if the host has it.
#ifdef __APPLE__
Define(Defs, "__APPLE__");
Define(Defs, "__MACH__");
#endif
if (1) {// -fobjc-gc controls this.
Define(Defs, "__weak", "");