Skip to content

Commit 1ff5f0c

Browse files
committed
Revert "[Remarks][Driver] Use different remark files when targeting multiple architectures"
This reverts commit b4e2b11. Test doesn't appear to pass on Windows, maybe all non-Mac.
1 parent 30e7ee3 commit 1ff5f0c

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,8 +5218,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
52185218
if (A) {
52195219
CmdArgs.push_back(A->getValue());
52205220
} else {
5221-
bool hasMultipleArchs =
5222-
Args.getAllArgValues(options::OPT_arch).size() > 1;
52235221
SmallString<128> F;
52245222

52255223
if (Args.hasArg(options::OPT_c) || Args.hasArg(options::OPT_S)) {
@@ -5244,22 +5242,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
52445242
}
52455243
}
52465244

5247-
// If we're having more than one "-arch", we should name the files
5248-
// differently so that every cc1 invocation writes to a different file.
5249-
// We're doing that by appending "-<arch>" with "<arch>" being the arch
5250-
// name from the triple.
5251-
if (hasMultipleArchs) {
5252-
// First, remember the extension.
5253-
SmallString<64> OldExtension = llvm::sys::path::extension(F);
5254-
// then, remove it.
5255-
llvm::sys::path::replace_extension(F, "");
5256-
// attach -<arch> to it.
5257-
F += "-";
5258-
F += Triple.getArchName();
5259-
// put back the extension.
5260-
llvm::sys::path::replace_extension(F, OldExtension);
5261-
}
5262-
52635245
std::string Extension = "opt.";
52645246
if (const Arg *A =
52655247
Args.getLastArg(options::OPT_fsave_optimization_record_EQ))

clang/test/Driver/opt-record.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// RUN: %clang -### -S -o FOO -fsave-optimization-record -fsave-optimization-record=some-format %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ-FORMAT
1919
// RUN: %clang -### -S -o FOO -fsave-optimization-record=some-format %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ-FORMAT
2020
// RUN: %clang -### -S -o FOO -fsave-optimization-record=some-format -fno-save-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-FOPT-DISABLE-FORMAT
21-
// RUN: %clang -### -S -o FOO -fsave-optimization-record -arch x86_64 -arch x86_64h %s 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-ARCH
2221
//
2322
// CHECK: "-cc1"
2423
// CHECK: "-opt-record-file" "FOO.opt.yaml"
@@ -42,8 +41,3 @@
4241
// CHECK-EQ-FORMAT: "-opt-record-format" "some-format"
4342

4443
// CHECK-FOPT-DISABLE-FORMAT-NOT: "-fno-save-optimization-record"
45-
46-
// CHECK-MULTIPLE-ARCH: "-cc1"
47-
// CHECK-MULTIPLE-ARCH: "-opt-record-file" "FOO-x86_64.opt.yaml"
48-
// CHECK-MULTIPLE-ARCH: "-cc1"
49-
// CHECK-MULTIPLE-ARCH: "-opt-record-file" "FOO-x86_64h.opt.yaml"

0 commit comments

Comments
 (0)