Skip to content

Commit 54e5be4

Browse files
committed
Use getLastProfileSampleUseArg instead and remove -S in test.
1 parent 1a61846 commit 54e5be4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Driver/ToolChains/MSVC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
233233
}
234234

235235
if (C.getDriver().isUsingLTO()) {
236-
if (Arg *A = Args.getLastArg(options::OPT_fprofile_sample_use_EQ))
236+
if (Arg *A = tools::getLastProfileSampleUseArg(Args))
237237
CmdArgs.push_back(Args.MakeArgString(std::string("-lto-sample-profile:") +
238238
A->getValue()));
239239
}

clang/test/Driver/cl-link.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@
7272
// INFER-LLD: lld-link
7373
// INFER-LLD-NOT: INFERASANLIBS
7474

75-
// RUN: %clang_cl --target=x86_64-unknown-windows-msvc -flto -fuse-ld=lld -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s
75+
// RUN: %clang_cl --target=x86_64-unknown-windows-msvc /Tc%s -flto -fuse-ld=lld -### -fprofile-sample-use=%S/Inputs/file.prof 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s
7676
// CHECK-SAMPLE-PROFILE: "-lto-sample-profile:{{.*}}/file.prof"

0 commit comments

Comments
 (0)