[llvm] 696eb3a - Remove unnecessary newline from error message

Alex Richardson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 12:12:22 PDT 2023


Author: Alex Richardson
Date: 2023-10-26T12:07:37-07:00
New Revision: 696eb3a55aecb6d6a702da9d7d88fbae7b3d77d0

URL: https://github.com/llvm/llvm-project/commit/696eb3a55aecb6d6a702da9d7d88fbae7b3d77d0
DIFF: https://github.com/llvm/llvm-project/commit/696eb3a55aecb6d6a702da9d7d88fbae7b3d77d0.diff

LOG: Remove unnecessary newline from error message

I was writing a test that included this error and noticed the spurios
newline that made writing the test more awkward.

Added: 
    

Modified: 
    llvm/lib/MC/TargetRegistry.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/TargetRegistry.cpp b/llvm/lib/MC/TargetRegistry.cpp
index fa7aaccabcd6109..0aa48916c7d2585 100644
--- a/llvm/lib/MC/TargetRegistry.cpp
+++ b/llvm/lib/MC/TargetRegistry.cpp
@@ -49,9 +49,8 @@ const Target *TargetRegistry::lookupTarget(StringRef ArchName,
     std::string TempError;
     TheTarget = TargetRegistry::lookupTarget(TheTriple.getTriple(), TempError);
     if (!TheTarget) {
-      Error = "unable to get target for '"
-            + TheTriple.getTriple()
-            + "', see --version and --triple.\n";
+      Error = "unable to get target for '" + TheTriple.getTriple() +
+              "', see --version and --triple.";
       return nullptr;
     }
   }


        


More information about the llvm-commits mailing list