[clang] 232c00b - [RISCV] Add extra space into error message about unsupported extension version.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu May 12 12:56:40 PDT 2022


Author: Craig Topper
Date: 2022-05-12T12:56:29-07:00
New Revision: 232c00ba5bd1dc6ba69598170f57cba7b20d2635

URL: https://github.com/llvm/llvm-project/commit/232c00ba5bd1dc6ba69598170f57cba7b20d2635
DIFF: https://github.com/llvm/llvm-project/commit/232c00ba5bd1dc6ba69598170f57cba7b20d2635.diff

LOG: [RISCV] Add extra space into error message about unsupported extension version.

Differential Revision: https://reviews.llvm.org/D125491

Added: 
    

Modified: 
    clang/test/Driver/riscv-arch.c
    llvm/lib/Support/RISCVISAInfo.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/riscv-arch.c b/clang/test/Driver/riscv-arch.c
index 1a8c321e956b..0ea96596dab7 100644
--- a/clang/test/Driver/riscv-arch.c
+++ b/clang/test/Driver/riscv-arch.c
@@ -425,8 +425,7 @@
 // RUN: %clang --target=riscv32-unknown-elf -march=rv32izbt0p1 -menable-experimental-extensions -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-BADVERS %s
 // RV32-EXPERIMENTAL-BADVERS: error: invalid arch name 'rv32izbt0p1'
-// RV32-EXPERIMENTAL-BADVERS: unsupported version number 0.1 for experimental extension
-// RV32-EXPERIMENTAL-BADVERS: 'zbt'(this compiler supports 0.93)
+// RV32-EXPERIMENTAL-BADVERS: unsupported version number 0.1 for experimental extension 'zbt' (this compiler supports 0.93)
 
 // RUN: %clang --target=riscv32-unknown-elf -march=rv32izbt0p93 -menable-experimental-extensions -### %s \
 // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-GOODVERS %s

diff  --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp
index 96b2cd9875d3..6b2614dbdd4c 100644
--- a/llvm/lib/Support/RISCVISAInfo.cpp
+++ b/llvm/lib/Support/RISCVISAInfo.cpp
@@ -406,8 +406,8 @@ static Error getExtensionVersion(StringRef Ext, StringRef In, unsigned &Major,
       if (!MinorStr.empty())
         Error += "." + MinorStr.str();
       Error += " for experimental extension '" + Ext.str() +
-               "'(this compiler supports " + utostr(SupportedVers.Major) + "." +
-               utostr(SupportedVers.Minor) + ")";
+               "' (this compiler supports " + utostr(SupportedVers.Major) +
+               "." + utostr(SupportedVers.Minor) + ")";
       return createStringError(errc::invalid_argument, Error);
     }
     return Error::success();


        


More information about the cfe-commits mailing list