The case statements for adding __linux__ and its associated defines are
missing for ppc and sparc targets. This patch adds them.
-Hal
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 8fe4963..032c108 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -3598,6 +3598,8 @@ static TargetInfo *AllocateTarget(const std::string &T) {
if (Triple.isOSDarwin())
return new DarwinPPC32TargetInfo(T);
switch (os) {
+ case llvm::Triple::Linux:
+ return new LinuxTargetInfo<PPC32TargetInfo>(T);
case llvm::Triple::FreeBSD:
return new FreeBSDTargetInfo<PPC32TargetInfo>(T);
case llvm::Triple::NetBSD:
@@ -3612,6 +3614,8 @@ static TargetInfo *AllocateTarget(const std::string &T) {
if (Triple.isOSDarwin())
return new DarwinPPC64TargetInfo(T);
switch (os) {
+ case llvm::Triple::Linux:
+ return new LinuxTargetInfo<PPC64TargetInfo>(T);
case llvm::Triple::Lv2:
return new PS3PPUTargetInfo<PPC64TargetInfo>(T);
case llvm::Triple::FreeBSD:
@@ -3632,6 +3636,8 @@ static TargetInfo *AllocateTarget(const std::string &T) {
case llvm::Triple::sparc:
switch (os) {
+ case llvm::Triple::Linux:
+ return new LinuxTargetInfo<SparcV8TargetInfo>(T);
case llvm::Triple::AuroraUX:
return new AuroraUXSparcV8TargetInfo(T);
case llvm::Triple::Solaris:
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits