diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 3882019b34aa4..6aed20667c8d7 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -4440,9 +4440,9 @@ defm data_sections : BoolFOption<"data-sections", PosFlag, NegFlag>; -defm call_graph_section - : BoolFOption<"call-graph-section", CodeGenOpts<"CallGraphSection">, - DefaultFalse, +defm experimental_call_graph_section + : BoolFOption<"experimental-call-graph-section", + CodeGenOpts<"CallGraphSection">, DefaultFalse, PosFlag, NegFlag>; diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index d0e254f07ad42..6a13e0c2fefc3 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -6478,9 +6478,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(A->getValue()); } - if (Args.hasFlag(options::OPT_fcall_graph_section, - options::OPT_fno_call_graph_section, false)) - CmdArgs.push_back("-fcall-graph-section"); + if (Args.hasFlag(options::OPT_fexperimental_call_graph_section, + options::OPT_fno_experimental_call_graph_section, false)) + CmdArgs.push_back("-fexperimental-call-graph-section"); Args.addOptInFlag(CmdArgs, options::OPT_fstack_size_section, options::OPT_fno_stack_size_section); diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index cf67e0903c345..bfd88434d8363 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -1269,8 +1269,8 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, CmdArgs.push_back( Args.MakeArgString(Twine(PluginOptPrefix) + "-stack-size-section")); - if (Args.hasFlag(options::OPT_fcall_graph_section, - options::OPT_fno_call_graph_section, false)) + if (Args.hasFlag(options::OPT_fexperimental_call_graph_section, + options::OPT_fno_experimental_call_graph_section, false)) CmdArgs.push_back( Args.MakeArgString(Twine(PluginOptPrefix) + "-call-graph-section")); diff --git a/clang/test/CodeGen/call-graph-section-templates.cpp b/clang/test/CodeGen/call-graph-section-templates.cpp index 3fe109fc75c8b..43be48e94125b 100644 --- a/clang/test/CodeGen/call-graph-section-templates.cpp +++ b/clang/test/CodeGen/call-graph-section-templates.cpp @@ -1,7 +1,7 @@ // Tests that we assign appropriate identifiers to indirect calls and targets // specifically for C++ templates. -// RUN: %clang_cc1 -triple x86_64-unknown-linux -fcall-graph-section \ +// RUN: %clang_cc1 -triple x86_64-unknown-linux -fexperimental-call-graph-section \ // RUN: -emit-llvm -o %t %s // RUN: FileCheck --check-prefix=FT %s < %t // RUN: FileCheck --check-prefix=CST %s < %t diff --git a/clang/test/CodeGen/call-graph-section-virtual-methods.cpp b/clang/test/CodeGen/call-graph-section-virtual-methods.cpp index 55e1d6a4646fd..aacd274dadbed 100644 --- a/clang/test/CodeGen/call-graph-section-virtual-methods.cpp +++ b/clang/test/CodeGen/call-graph-section-virtual-methods.cpp @@ -1,7 +1,7 @@ // Tests that we assign appropriate identifiers to indirect calls and targets // specifically for virtual methods. -// RUN: %clang_cc1 -triple x86_64-unknown-linux -fcall-graph-section \ +// RUN: %clang_cc1 -triple x86_64-unknown-linux -fexperimental-call-graph-section \ // RUN: -emit-llvm -o %t %s // RUN: FileCheck --check-prefix=FT %s < %t // RUN: FileCheck --check-prefix=CST %s < %t diff --git a/clang/test/CodeGen/call-graph-section.c b/clang/test/CodeGen/call-graph-section.c index 21d03944153e7..3579b5551bdf8 100644 --- a/clang/test/CodeGen/call-graph-section.c +++ b/clang/test/CodeGen/call-graph-section.c @@ -1,9 +1,9 @@ // Tests that we assign appropriate identifiers to indirect calls and targets. -// RUN: %clang_cc1 -triple x86_64-unknown-linux -fcall-graph-section \ +// RUN: %clang_cc1 -triple x86_64-unknown-linux -fexperimental-call-graph-section \ // RUN: -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,ITANIUM %s -// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fcall-graph-section \ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fexperimental-call-graph-section \ // RUN: -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,MS %s // CHECK-DAG: define {{(dso_local)?}} void @foo({{.*}} !type [[F_TVOID:![0-9]+]] diff --git a/clang/test/CodeGen/call-graph-section.cpp b/clang/test/CodeGen/call-graph-section.cpp index 317ee7665b7c9..467fdd111b71d 100644 --- a/clang/test/CodeGen/call-graph-section.cpp +++ b/clang/test/CodeGen/call-graph-section.cpp @@ -1,7 +1,7 @@ // Tests that we assign appropriate identifiers to indirect calls and targets // specifically for C++ class and instance methods. -// RUN: %clang_cc1 -triple x86_64-unknown-linux -fcall-graph-section \ +// RUN: %clang_cc1 -triple x86_64-unknown-linux -fexperimental-call-graph-section \ // RUN: -emit-llvm -o %t %s // RUN: FileCheck --check-prefix=FT %s < %t // RUN: FileCheck --check-prefix=CST %s < %t diff --git a/clang/test/Driver/call-graph-section.c b/clang/test/Driver/call-graph-section.c index 563f36de4119e..00fa896dffb87 100644 --- a/clang/test/Driver/call-graph-section.c +++ b/clang/test/Driver/call-graph-section.c @@ -1,5 +1,5 @@ -// RUN: %clang -### -fcall-graph-section %s 2>&1 | FileCheck --check-prefix=CALL-GRAPH-SECTION %s -// RUN: %clang -### -fcall-graph-section -fno-call-graph-section %s 2>&1 | FileCheck --check-prefix=NO-CALL-GRAPH-SECTION %s +// RUN: %clang -### -fexperimental-call-graph-section %s 2>&1 | FileCheck --check-prefix=CALL-GRAPH-SECTION %s +// RUN: %clang -### -fexperimental-call-graph-section -fno-experimental-call-graph-section %s 2>&1 | FileCheck --check-prefix=NO-CALL-GRAPH-SECTION %s -// CALL-GRAPH-SECTION: "-fcall-graph-section" -// NO-CALL-GRAPH-SECTION-NOT: "-fcall-graph-section" +// CALL-GRAPH-SECTION: "-fexperimental-call-graph-section" +// NO-CALL-GRAPH-SECTION-NOT: "-fexperimental-call-graph-section"