[PATCH] D106193: [CSSPGO] Turn on unique linkage name by default for pseudo probe.
Hongtao Yu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 16 16:43:47 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG77aec978a911: [CSSPGO] Turn on unique linkage name by default for pseudo probe. (authored by hoy).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106193/new/
https://reviews.llvm.org/D106193
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/pseudo-probe.c
Index: clang/test/Driver/pseudo-probe.c
===================================================================
--- clang/test/Driver/pseudo-probe.c
+++ clang/test/Driver/pseudo-probe.c
@@ -1,7 +1,13 @@
// RUN: %clang -### -fpseudo-probe-for-profiling %s 2>&1 | FileCheck %s --check-prefix=YESPROBE
// RUN: %clang -### -fno-pseudo-probe-for-profiling %s 2>&1 | FileCheck %s --check-prefix=NOPROBE
// RUN: %clang -### -fpseudo-probe-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck %s --check-prefix=CONFLICT
+// RUN: %clang -### -fpseudo-probe-for-profiling -funique-internal-linkage-names %s 2>&1 | FileCheck %s --check-prefix=YESPROBE
+// RUN: %clang -### -fpseudo-probe-for-profiling -fno-unique-internal-linkage-names %s 2>&1 | FileCheck %s --check-prefix=NONAME
// YESPROBE: -fpseudo-probe-for-profiling
+// YESPROBE: -funique-internal-linkage-names
// NOPROBE-NOT: -fpseudo-probe-for-profiling
+// NOPROBE-NOT: -funique-internal-linkage-names
+// NONAME: -fpseudo-probe-for-profiling
+// NONAME-NOT: -funique-internal-linkage-names
// CONFLICT: invalid argument
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -5972,8 +5972,14 @@
Args.AddLastArg(CmdArgs, options::OPT_fprofile_remapping_file_EQ);
if (Args.hasFlag(options::OPT_fpseudo_probe_for_profiling,
- options::OPT_fno_pseudo_probe_for_profiling, false))
+ options::OPT_fno_pseudo_probe_for_profiling, false)) {
CmdArgs.push_back("-fpseudo-probe-for-profiling");
+ // Enforce -funique-internal-linkage-names if it's not explicitly turned
+ // off.
+ if (Args.hasFlag(options::OPT_funique_internal_linkage_names,
+ options::OPT_fno_unique_internal_linkage_names, true))
+ CmdArgs.push_back("-funique-internal-linkage-names");
+ }
}
RenderBuiltinOptions(TC, RawTriple, Args, CmdArgs);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106193.359481.patch
Type: text/x-patch
Size: 2027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210716/9dafc742/attachment.bin>
More information about the cfe-commits
mailing list