From: Rafael Espindola Date: Fri, 22 May 2015 20:44:03 +0000 (+0000) Subject: Make unique section names the default again. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8e9dddb5681b29df046c438ea729e35c83e9b18;p=clang Make unique section names the default again. Using non unique names found a bug in the ICF inplementation in gold: https://sourceware.org/bugzilla/show_bug.cgi?id=18440 This reverts commit r234143. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238048 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 261af720d3..9b25cab970 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3166,10 +3166,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.hasArg(options::OPT_dA)) CmdArgs.push_back("-masm-verbose"); - bool UsingIntegratedAssembler = - Args.hasFlag(options::OPT_fintegrated_as, options::OPT_fno_integrated_as, - IsIntegratedAssemblerDefault); - if (!UsingIntegratedAssembler) + if (!Args.hasFlag(options::OPT_fintegrated_as, options::OPT_fno_integrated_as, + IsIntegratedAssemblerDefault)) CmdArgs.push_back("-no-integrated-as"); if (Args.hasArg(options::OPT_fdebug_pass_structure)) { @@ -3412,8 +3410,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } if (!Args.hasFlag(options::OPT_funique_section_names, - options::OPT_fno_unique_section_names, - !UsingIntegratedAssembler)) + options::OPT_fno_unique_section_names, true)) CmdArgs.push_back("-fno-unique-section-names"); Args.AddAllArgs(CmdArgs, options::OPT_finstrument_functions); diff --git a/test/Driver/function-sections.c b/test/Driver/function-sections.c index 6c243195f6..ba065b1367 100644 --- a/test/Driver/function-sections.c +++ b/test/Driver/function-sections.c @@ -72,13 +72,3 @@ // RUN: -target i386-unknown-linux \ // RUN: -fno-unique-section-names \ // RUN: | FileCheck --check-prefix=CHECK-NOUS %s - -// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ -// RUN: -target i386-unknown-linux \ -// RUN: -fno-integrated-as \ -// RUN: | FileCheck --check-prefix=CHECK-US %s - -// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ -// RUN: -target i386-unknown-linux \ -// RUN: -fintegrated-as \ -// RUN: | FileCheck --check-prefix=CHECK-NOUS %s