[llvm-commits] [llvm] r129809 - in /llvm/trunk/lib/Target/PowerPC: PPCSubtarget.cpp PPCSubtarget.h

Daniel Dunbar daniel at zuster.org
Tue Apr 19 13:54:28 PDT 2011


Author: ddunbar
Date: Tue Apr 19 15:54:28 2011
New Revision: 129809

URL: http://llvm.org/viewvc/llvm-project?rev=129809&view=rev
Log:
Target/PPC: Add a TargetTriple field.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
    llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h

Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp?rev=129809&r1=129808&r2=129809&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp Tue Apr 19 15:54:28 2011
@@ -70,7 +70,8 @@
   , HasSTFIWX(false)
   , HasLazyResolverStubs(false)
   , IsJITCodeModel(false)
-  , DarwinVers(0) {
+  , DarwinVers(0)
+  , TargetTriple(TT) {
 
   // Determine default and user specified characteristics
   std::string CPU = "generic";

Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h?rev=129809&r1=129808&r2=129809&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h Tue Apr 19 15:54:28 2011
@@ -14,6 +14,7 @@
 #ifndef POWERPCSUBTARGET_H
 #define POWERPCSUBTARGET_H
 
+#include "llvm/ADT/Triple.h"
 #include "llvm/Target/TargetInstrItineraries.h"
 #include "llvm/Target/TargetSubtarget.h"
 
@@ -68,6 +69,10 @@
   /// DarwinVers - Nonzero if this is a darwin platform.  Otherwise, the numeric
   /// version of the platform, e.g. 8 = 10.4 (Tiger), 9 = 10.5 (Leopard), etc.
   unsigned char DarwinVers; // Is any darwin-ppc platform.
+
+  /// TargetTriple - What processor and OS we're targeting.
+  Triple TargetTriple;
+
 public:
   /// This constructor initializes the data members to match that
   /// of the specified triple.
@@ -134,6 +139,8 @@
   bool hasAltivec() const { return HasAltivec; }
   bool isGigaProcessor() const { return IsGigaProcessor; }
 
+  const Triple &getTargetTriple() const { return TargetTriple; }
+
   /// isDarwin - True if this is any darwin platform.
   bool isDarwin() const { return DarwinVers != 0; }
   /// isDarwin - True if this is darwin9 (leopard, 10.5) or above.





More information about the llvm-commits mailing list