Skip to content

Commit c0cbcad

Browse files
authored
merge main into amd-staging (llvm#1819)
2 parents 60ace2d + 2a3c908 commit c0cbcad

File tree

128 files changed

+3771
-3197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+3771
-3197
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,14 @@ def err_drv_print_header_env_var : Error<
409409
"environment variable CC_PRINT_HEADERS_%select{FORMAT|FILTERING}0 has invalid value %1">;
410410
def err_drv_print_header_env_var_combination : Error<
411411
"unsupported combination: CC_PRINT_HEADERS_FORMAT=%0 and CC_PRINT_HEADERS_FILTERING=%1">;
412-
def err_drv_print_header_env_var_combination_cc1 : Error<
412+
def err_drv_print_header_env_var_invalid_format : Error<
413+
"environment variable CC_PRINT_HEADERS_FORMAT=%0 requires a compatible value for CC_PRINT_HEADERS_FILTERING">;
414+
def err_drv_print_header_cc1_invalid_combination : Error<
413415
"unsupported combination: -header-include-format=%0 and -header-include-filtering=%1">;
416+
def err_drv_print_header_cc1_invalid_filtering : Error<
417+
"-header-include-filtering=%0 requires a compatible value for -header-include-format">;
418+
def err_drv_print_header_cc1_invalid_format : Error<
419+
"-header-include-format=%0 requires a compatible value for -header-include-filtering">;
414420

415421
def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup<Deprecated>;
416422
def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">,

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,17 +2069,8 @@ CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
20692069
return getOrCreateInstanceMethodType(ThisType, Func, Unit);
20702070
}
20712071

2072-
llvm::DISubroutineType *CGDebugInfo::getOrCreateMethodTypeForDestructor(
2073-
const CXXMethodDecl *Method, llvm::DIFile *Unit, QualType FNType) {
2074-
const FunctionProtoType *Func = FNType->getAs<FunctionProtoType>();
2075-
// skip the first param since it is also this
2076-
return getOrCreateInstanceMethodType(Method->getThisType(), Func, Unit, true);
2077-
}
2078-
2079-
llvm::DISubroutineType *
2080-
CGDebugInfo::getOrCreateInstanceMethodType(QualType ThisPtr,
2081-
const FunctionProtoType *Func,
2082-
llvm::DIFile *Unit, bool SkipFirst) {
2072+
llvm::DISubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
2073+
QualType ThisPtr, const FunctionProtoType *Func, llvm::DIFile *Unit) {
20832074
FunctionProtoType::ExtProtoInfo EPI = Func->getExtProtoInfo();
20842075
Qualifiers &Qc = EPI.TypeQuals;
20852076
Qc.removeConst();
@@ -2119,7 +2110,7 @@ CGDebugInfo::getOrCreateInstanceMethodType(QualType ThisPtr,
21192110
}
21202111

21212112
// Copy rest of the arguments.
2122-
for (unsigned i = (SkipFirst ? 2 : 1), e = Args.size(); i != e; ++i)
2113+
for (unsigned i = 1, e = Args.size(); i != e; ++i)
21232114
Elts.push_back(Args[i]);
21242115

21252116
// Attach FlagObjectPointer to the explicit "this" parameter.
@@ -4435,12 +4426,6 @@ llvm::DISubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
44354426
// subprogram DIE will miss DW_AT_decl_file and DW_AT_decl_line fields.
44364427
return DBuilder.createSubroutineType(DBuilder.getOrCreateTypeArray({}));
44374428

4438-
if (const auto *Method = dyn_cast<CXXDestructorDecl>(D)) {
4439-
// Read method type from 'FnType' because 'D.getType()' does not cover
4440-
// implicit arguments for destructors.
4441-
return getOrCreateMethodTypeForDestructor(Method, F, FnType);
4442-
}
4443-
44444429
if (const auto *Method = dyn_cast<CXXMethodDecl>(D))
44454430
return getOrCreateMethodType(Method, F);
44464431

clang/lib/CodeGen/CGDebugInfo.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,9 @@ class CGDebugInfo {
249249
/// to get a method type which includes \c this pointer.
250250
llvm::DISubroutineType *getOrCreateMethodType(const CXXMethodDecl *Method,
251251
llvm::DIFile *F);
252-
253-
llvm::DISubroutineType *
254-
getOrCreateMethodTypeForDestructor(const CXXMethodDecl *Method,
255-
llvm::DIFile *F, QualType FNType);
256-
257252
llvm::DISubroutineType *
258253
getOrCreateInstanceMethodType(QualType ThisPtr, const FunctionProtoType *Func,
259-
llvm::DIFile *Unit, bool SkipFirst = false);
254+
llvm::DIFile *Unit);
260255
llvm::DISubroutineType *
261256
getOrCreateFunctionType(const Decl *D, QualType FnType, llvm::DIFile *F);
262257
/// \return debug info descriptor for vtable.

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,13 +2443,25 @@ static bool ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
24432443

24442444
// Check for invalid combinations of header-include-format
24452445
// and header-include-filtering.
2446-
if ((Opts.HeaderIncludeFormat == HIFMT_Textual &&
2447-
Opts.HeaderIncludeFiltering != HIFIL_None) ||
2448-
(Opts.HeaderIncludeFormat == HIFMT_JSON &&
2449-
Opts.HeaderIncludeFiltering != HIFIL_Only_Direct_System))
2450-
Diags.Report(diag::err_drv_print_header_env_var_combination_cc1)
2451-
<< Args.getLastArg(OPT_header_include_format_EQ)->getValue()
2452-
<< Args.getLastArg(OPT_header_include_filtering_EQ)->getValue();
2446+
if (Opts.HeaderIncludeFormat == HIFMT_Textual &&
2447+
Opts.HeaderIncludeFiltering != HIFIL_None) {
2448+
if (Args.hasArg(OPT_header_include_format_EQ))
2449+
Diags.Report(diag::err_drv_print_header_cc1_invalid_combination)
2450+
<< headerIncludeFormatKindToString(Opts.HeaderIncludeFormat)
2451+
<< headerIncludeFilteringKindToString(Opts.HeaderIncludeFiltering);
2452+
else
2453+
Diags.Report(diag::err_drv_print_header_cc1_invalid_filtering)
2454+
<< headerIncludeFilteringKindToString(Opts.HeaderIncludeFiltering);
2455+
} else if (Opts.HeaderIncludeFormat == HIFMT_JSON &&
2456+
Opts.HeaderIncludeFiltering == HIFIL_None) {
2457+
if (Args.hasArg(OPT_header_include_filtering_EQ))
2458+
Diags.Report(diag::err_drv_print_header_cc1_invalid_combination)
2459+
<< headerIncludeFormatKindToString(Opts.HeaderIncludeFormat)
2460+
<< headerIncludeFilteringKindToString(Opts.HeaderIncludeFiltering);
2461+
else
2462+
Diags.Report(diag::err_drv_print_header_cc1_invalid_format)
2463+
<< headerIncludeFormatKindToString(Opts.HeaderIncludeFormat);
2464+
}
24532465

24542466
return Diags.getNumErrors() == NumErrorsBefore;
24552467
}

clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

clang/test/Driver/fsanitize.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,27 @@
951951
// CHECK-CFI-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
952952
// CHECK-CFI-MINIMAL: "-fsanitize-minimal-runtime"
953953

954+
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime -fsanitize-recover=cfi -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-RECOVER-MINIMAL
955+
// CHECK-CFI-RECOVER-MINIMAL: "-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
956+
// CHECK-CFI-RECOVER-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
957+
// CHECK-CFI-RECOVER-MINIMAL: "-fsanitize-minimal-runtime"
958+
959+
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime -fno-sanitize-recover=cfi -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-ABORT-MINIMAL
960+
// CHECK-CFI-ABORT-MINIMAL: "-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
961+
// CHECK-CFI-ABORT-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
962+
// CHECK-CFI-ABORT-MINIMAL: "-fsanitize-minimal-runtime"
963+
964+
// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime -fno-sanitize-trap=cfi -fsanitize-recover=cfi -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-RECOVER-MINIMAL --
965+
// CHECK-CFI-NOTRAP-RECOVER-MINIMAL: 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi'
966+
// CHECK-CFI-NOTRAP-RECOVER-MINIMAL: "-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
967+
// CHECK-CFI-NOTRAP-RECOVER-MINIMAL: "-fsanitize-recover=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
968+
// CHECK-CFI-NOTRAP-RECOVER-MINIMAL: "-fsanitize-minimal-runtime"
969+
970+
// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime -fno-sanitize-trap=cfi -fno-sanitize-recover=cfi -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-ABORT-MINIMAL
971+
// CHECK-CFI-NOTRAP-ABORT-MINIMAL: 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi'
972+
// CHECK-CFI-NOTRAP-ABORT-MINIMAL: "-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall"
973+
// CHECK-CFI-NOTRAP-ABORT-MINIMAL: "-fsanitize-minimal-runtime"
974+
954975
// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-MINIMAL
955976
// CHECK-CFI-NOTRAP-MINIMAL: error: invalid argument 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi'
956977

clang/test/Driver/riscv-cpus.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,3 +726,37 @@
726726

727727
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=andes-nx45 | FileCheck -check-prefix=MTUNE-ANDES-NX45 %s
728728
// MTUNE-ANDES-NX45: "-tune-cpu" "andes-nx45"
729+
730+
// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=andes-a45 | FileCheck -check-prefix=MCPU-ANDES-A45 %s
731+
// MCPU-ANDES-A45: "-target-cpu" "andes-a45"
732+
// MCPU-ANDES-A45-SAME: "-target-feature" "+m"
733+
// MCPU-ANDES-A45-SAME: "-target-feature" "+a"
734+
// MCPU-ANDES-A45-SAME: "-target-feature" "+f"
735+
// MCPU-ANDES-A45-SAME: "-target-feature" "+d"
736+
// MCPU-ANDES-A45-SAME: "-target-feature" "+c"
737+
// MCPU-ANDES-A45-SAME: "-target-feature" "+zicsr"
738+
// MCPU-ANDES-A45-SAME: "-target-feature" "+zifencei"
739+
// MCPU-ANDES-A45-SAME: "-target-feature" "+zba"
740+
// MCPU-ANDES-A45-SAME: "-target-feature" "+zbb"
741+
// MCPU-ANDES-A45-SAME: "-target-feature" "+zbs"
742+
// MCPU-ANDES-A45-SAME: "-target-abi" "ilp32d"
743+
744+
// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=andes-a45 | FileCheck -check-prefix=MTUNE-ANDES-A45 %s
745+
// MTUNE-ANDES-A45: "-tune-cpu" "andes-a45"
746+
747+
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=andes-ax45 | FileCheck -check-prefix=MCPU-ANDES-AX45 %s
748+
// MCPU-ANDES-AX45: "-target-cpu" "andes-ax45"
749+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+m"
750+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+a"
751+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+f"
752+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+d"
753+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+c"
754+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+zicsr"
755+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+zifencei"
756+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+zba"
757+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+zbb"
758+
// MCPU-ANDES-AX45-SAME: "-target-feature" "+zbs"
759+
// MCPU-ANDES-AX45-SAME: "-target-abi" "lp64d"
760+
761+
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=andes-ax45 | FileCheck -check-prefix=MTUNE-ANDES-AX45 %s
762+
// MTUNE-ANDES-AX45: "-tune-cpu" "andes-ax45"

clang/test/Driver/sanitizer-ld.c

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,84 @@
908908
// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "{{[^"]*}}libclang_rt.ubsan_standalone.so"
909909
// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "--export-dynamic-symbol=__cfi_check"
910910

911+
// CFI by itself does not link runtime libraries.
912+
// RUN: %clang -fsanitize=cfi \
913+
// RUN: -flto -fvisibility=hidden \
914+
// RUN: -fsanitize-minimal-runtime \
915+
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
916+
// RUN: -resource-dir=%S/Inputs/resource_dir \
917+
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
918+
// RUN: -### %s 2>&1 \
919+
// RUN: | %{filecheck} --check-prefix=CHECK-CFI-MINRT-LINUX
920+
// CHECK-CFI-MINRT-LINUX: "{{.*}}ld{{(.exe)?}}"
921+
922+
// CFI with diagnostics links the UBSan runtime.
923+
// RUN: not %clang -fsanitize=cfi -fno-sanitize-trap=cfi -fsanitize-recover=cfi \
924+
// RUN: -flto -fvisibility=hidden \
925+
// RUN: -fsanitize-minimal-runtime \
926+
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
927+
// RUN: -resource-dir=%S/Inputs/resource_dir \
928+
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
929+
// RUN: -### %s 2>&1 \
930+
// RUN: | %{filecheck} --check-prefix=CHECK-CFI-MINRT-DIAG-LINUX
931+
// CHECK-CFI-MINRT-DIAG-LINUX: 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi'
932+
// CHECK-CFI-MINRT-DIAG-LINUX: "{{.*}}ld{{(.exe)?}}"
933+
// CHECK-CFI-MINRT-DIAG-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.ubsan_minimal.a" "--no-whole-archive"
934+
935+
// Cross-DSO CFI links the CFI runtime.
936+
// RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \
937+
// RUN: -flto -fvisibility=hidden \
938+
// RUN: -fsanitize-minimal-runtime \
939+
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
940+
// RUN: -resource-dir=%S/Inputs/resource_dir \
941+
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
942+
// RUN: -### %s 2>&1 \
943+
// RUN: | %{filecheck} --check-prefix=CHECK-CFI-MINRT-CROSS-DSO-LINUX
944+
// CHECK-CFI-MINRT-CROSS-DSO-LINUX: "{{.*}}ld{{(.exe)?}}"
945+
// CHECK-CFI-MINRT-CROSS-DSO-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.cfi.a" "--no-whole-archive"
946+
// CHECK-CFI-MINRT-CROSS-DSO-LINUX: -export-dynamic
947+
948+
// Cross-DSO CFI with diagnostics links just the CFI runtime.
949+
// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \
950+
// RUN: -flto -fvisibility=hidden \
951+
// RUN: -fsanitize-minimal-runtime \
952+
// RUN: -fno-sanitize-trap=cfi -fsanitize-recover=cfi \
953+
// RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
954+
// RUN: -resource-dir=%S/Inputs/resource_dir \
955+
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
956+
// RUN: -### %s 2>&1 \
957+
// RUN: | %{filecheck} --check-prefix=CHECK-CFI-MINRT-CROSS-DSO-DIAG-LINUX
958+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-LINUX: 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi'
959+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-LINUX: "{{.*}}ld{{(.exe)?}}"
960+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.cfi_diag.a" "--no-whole-archive"
961+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-LINUX: -export-dynamic
962+
963+
// Cross-DSO CFI on Android does not link runtime libraries.
964+
// RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \
965+
// RUN: -flto -fvisibility=hidden \
966+
// RUN: -fsanitize-minimal-runtime \
967+
// RUN: --target=aarch64-linux-android -fuse-ld=ld \
968+
// RUN: -resource-dir=%S/Inputs/resource_dir \
969+
// RUN: --sysroot=%S/Inputs/basic_android_tree \
970+
// RUN: -### %s 2>&1 \
971+
// RUN: | %{filecheck} --check-prefix=CHECK-CFI-MINRT-CROSS-DSO-ANDROID
972+
// CHECK-CFI-MINRT-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}"
973+
974+
// Cross-DSO CFI with diagnostics on Android links just the UBSAN runtime.
975+
// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \
976+
// RUN: -flto -fvisibility=hidden \
977+
// RUN: -fsanitize-minimal-runtime \
978+
// RUN: -fno-sanitize-trap=cfi -fsanitize-recover=cfi \
979+
// RUN: --target=aarch64-linux-android -fuse-ld=ld \
980+
// RUN: -resource-dir=%S/Inputs/resource_dir \
981+
// RUN: --sysroot=%S/Inputs/basic_android_tree \
982+
// RUN: -### %s 2>&1 \
983+
// RUN: | %{filecheck} --check-prefix=CHECK-CFI-MINRT-CROSS-DSO-DIAG-ANDROID
984+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-ANDROID: 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi'
985+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-ANDROID: "{{.*}}ld{{(.exe)?}}"
986+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-ANDROID: "{{[^"]*}}libclang_rt.ubsan_minimal.so"
987+
// CHECK-CFI-MINRT-CROSS-DSO-DIAG-ANDROID: "--export-dynamic-symbol=__cfi_check"
988+
911989
// RUN: %clangxx -fsanitize=address -### %s 2>&1 \
912990
// RUN: -mmacos-version-min=10.6 \
913991
// RUN: --target=x86_64-apple-darwin13.4.0 -fuse-ld=ld -stdlib=platform \

clang/test/Misc/target-invalid-cpu-note/riscv.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
// RUN: not %clang_cc1 -triple riscv32 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix RISCV32
66
// RISCV32: error: unknown target CPU 'not-a-cpu'
77
// RISCV32-NEXT: note: valid target CPU values are:
8-
// RISCV32-SAME: {{^}} andes-n45
8+
// RISCV32-SAME: {{^}} andes-a45
9+
// RISCV32-SAME: {{^}}, andes-n45
910
// RISCV32-SAME: {{^}}, generic-rv32
1011
// RISCV32-SAME: {{^}}, rocket-rv32
1112
// RISCV32-SAME: {{^}}, rp2350-hazard3
@@ -25,7 +26,8 @@
2526
// RUN: not %clang_cc1 -triple riscv64 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix RISCV64
2627
// RISCV64: error: unknown target CPU 'not-a-cpu'
2728
// RISCV64-NEXT: note: valid target CPU values are:
28-
// RISCV64-SAME: {{^}} andes-nx45
29+
// RISCV64-SAME: {{^}} andes-ax45
30+
// RISCV64-SAME: {{^}}, andes-nx45
2931
// RISCV64-SAME: {{^}}, generic-rv64
3032
// RISCV64-SAME: {{^}}, mips-p8700
3133
// RISCV64-SAME: {{^}}, rocket-rv64
@@ -54,7 +56,8 @@
5456
// RUN: not %clang_cc1 -triple riscv32 -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix TUNE-RISCV32
5557
// TUNE-RISCV32: error: unknown target CPU 'not-a-cpu'
5658
// TUNE-RISCV32-NEXT: note: valid target CPU values are:
57-
// TUNE-RISCV32-SAME: {{^}} andes-n45
59+
// TUNE-RISCV32-SAME: {{^}} andes-a45
60+
// TUNE-RISCV32-SAME: {{^}}, andes-n45
5861
// TUNE-RISCV32-SAME: {{^}}, generic-rv32
5962
// TUNE-RISCV32-SAME: {{^}}, rocket-rv32
6063
// TUNE-RISCV32-SAME: {{^}}, rp2350-hazard3
@@ -78,7 +81,8 @@
7881
// RUN: not %clang_cc1 -triple riscv64 -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix TUNE-RISCV64
7982
// TUNE-RISCV64: error: unknown target CPU 'not-a-cpu'
8083
// TUNE-RISCV64-NEXT: note: valid target CPU values are:
81-
// TUNE-RISCV64-SAME: {{^}} andes-nx45
84+
// TUNE-RISCV64-SAME: {{^}} andes-ax45
85+
// TUNE-RISCV64-SAME: {{^}}, andes-nx45
8286
// TUNE-RISCV64-SAME: {{^}}, generic-rv64
8387
// TUNE-RISCV64-SAME: {{^}}, mips-p8700
8488
// TUNE-RISCV64-SAME: {{^}}, rocket-rv64

0 commit comments

Comments
 (0)