[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Dec 12 09:40:39 PST 2004



Changes in directory llvm/lib/Target/SparcV8:

SparcV8TargetMachine.cpp updated: 1.24 -> 1.25
---
Log message:

Use the target triple to pick this target.



---
Diffs of the changes:  (+4 -0)

Index: llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp:1.24 llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp:1.25
--- llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp:1.24	Sat Dec 11 16:17:07 2004
+++ llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp	Sun Dec 12 11:40:27 2004
@@ -41,6 +41,10 @@
 }
 
 unsigned SparcV8TargetMachine::getModuleMatchQuality(const Module &M) {
+  std::string TT = M.getTargetTriple();
+  if (TT.size() >= 6 && std::string(TT.begin(), TT.begin()+6) == "sparc-")
+    return 20;
+
   if (M.getEndianness()  == Module::BigEndian &&
       M.getPointerSize() == Module::Pointer32)
 #ifdef __sparc__






More information about the llvm-commits mailing list