[llvm] r340509 - Improve incompatible triple error

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 22 20:40:32 PDT 2018


Author: jfb
Date: Wed Aug 22 20:40:31 2018
New Revision: 340509

URL: http://llvm.org/viewvc/llvm-project?rev=340509&view=rev
Log:
Improve incompatible triple error

When complaining that the triple is incompatible with all targets, print out the triple not just a generic error about triples not matching.

Modified:
    llvm/trunk/lib/Support/TargetRegistry.cpp

Modified: llvm/trunk/lib/Support/TargetRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/TargetRegistry.cpp?rev=340509&r1=340508&r2=340509&view=diff
==============================================================================
--- llvm/trunk/lib/Support/TargetRegistry.cpp (original)
+++ llvm/trunk/lib/Support/TargetRegistry.cpp Wed Aug 22 20:40:31 2018
@@ -72,7 +72,7 @@ const Target *TargetRegistry::lookupTarg
   auto I = find_if(targets(), ArchMatch);
 
   if (I == targets().end()) {
-    Error = "No available targets are compatible with this triple.";
+    Error = "No available targets are compatible with triple \"" + TT + "\"";
     return nullptr;
   }
 




More information about the llvm-commits mailing list