Skip to content

Commit 9a4d383

Browse files
authored
[SWDEV-490795] Revert "[SWDEV-487764] Revert "[Clang] [Driver] Ensure… (#400)
[[SWDEV-490795](https://ontrack-internal.amd.com/browse/SWDEV-490795)] Revert "[[SWDEV-487764](https://ontrack-internal.amd.com/browse/SWDEV-487764)] Revert "[Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (llvm#107509)"" This reverts commit 921e0df.
1 parent a8b8146 commit 9a4d383

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5956,7 +5956,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
59565956
}
59575957

59585958
if (Args.hasFlag(options::OPT_fms_volatile, options::OPT_fno_ms_volatile,
5959-
Triple.isX86() && D.IsCLMode()))
5959+
Triple.isX86() && IsWindowsMSVC))
59605960
CmdArgs.push_back("-fms-volatile");
59615961

59625962
// Non-PIC code defaults to -fdirect-access-external-data while PIC code

clang/test/Driver/clang_f_opts.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,10 @@
624624
// RUN: %clang -### --target=aarch64-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s
625625
// RUN: %clang -### --target=aarch64-windows-msvc -fms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-MS-VOLATILE %s
626626
// RUN: %clang -### --target=aarch64-windows-msvc -fno-ms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s
627+
// RUN: %clang -### --target=x86_64-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-MS-VOLATILE %s
628+
// RUN: %clang -### --target=x86_64-windows-msvc -fno-ms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s
629+
// RUN: %clang -### --target=i686-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-MS-VOLATILE %s
630+
// RUN: %clang -### --target=i686-windows-msvc -fno-ms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s
627631
// CHECK-MS-VOLATILE: -fms-volatile
628632
// CHECK-NO-MS-VOLATILE-NOT: -fms-volatile
629633

0 commit comments

Comments
 (0)