Accept '#pragma options align=mac68k' on Darwin/PPC and Darwin/PPC64.

llvm-svn: 105116
This commit is contained in:
Daniel Dunbar 2010-05-30 00:07:30 +00:00
parent a7774a685d
commit 0e15c9aef6
1 changed files with 23 additions and 2 deletions

View File

@ -600,6 +600,27 @@ public:
};
} // end anonymous namespace.
namespace {
class DarwinPPCTargetInfo :
public DarwinTargetInfo<PPCTargetInfo> {
public:
DarwinPPCTargetInfo(const std::string& triple)
: DarwinTargetInfo<PPCTargetInfo>(triple) {
HasAlignMac68kSupport = true;
}
};
class DarwinPPC64TargetInfo :
public DarwinTargetInfo<PPC64TargetInfo> {
public:
DarwinPPC64TargetInfo(const std::string& triple)
: DarwinTargetInfo<PPC64TargetInfo>(triple) {
HasAlignMac68kSupport = true;
}
};
} // end anonymous namespace.
namespace {
// MBlaze abstract base class
class MBlazeTargetInfo : public TargetInfo {
@ -2327,14 +2348,14 @@ static TargetInfo *AllocateTarget(const std::string &T) {
case llvm::Triple::ppc:
if (os == llvm::Triple::Darwin)
return new DarwinTargetInfo<PPCTargetInfo>(T);
return new DarwinPPCTargetInfo(T);
else if (os == llvm::Triple::FreeBSD)
return new FreeBSDTargetInfo<PPC32TargetInfo>(T);
return new PPC32TargetInfo(T);
case llvm::Triple::ppc64:
if (os == llvm::Triple::Darwin)
return new DarwinTargetInfo<PPC64TargetInfo>(T);
return new DarwinPPC64TargetInfo(T);
else if (os == llvm::Triple::Lv2)
return new PS3PPUTargetInfo<PPC64TargetInfo>(T);
else if (os == llvm::Triple::FreeBSD)