r330451 - Revert r330442, CodeGen/no-ident-version.c is failing on PPC

Mikhail Maltsev via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 20 10:14:39 PDT 2018


Author: miyuki
Date: Fri Apr 20 10:14:39 2018
New Revision: 330451

URL: http://llvm.org/viewvc/llvm-project?rev=330451&view=rev
Log:
Revert r330442, CodeGen/no-ident-version.c is failing on PPC

Removed:
    cfe/trunk/test/CodeGen/no-ident-version.c
Modified:
    cfe/trunk/include/clang/Driver/Options.td
    cfe/trunk/include/clang/Frontend/CodeGenOptions.def
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp
    cfe/trunk/lib/Driver/ToolChains/Clang.cpp
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=330451&r1=330450&r2=330451&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Apr 20 10:14:39 2018
@@ -396,10 +396,7 @@ def O_flag : Flag<["-"], "O">, Flags<[CC
 def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>;
 def P : Flag<["-"], "P">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
   HelpText<"Disable linemarker output in -E mode">;
-def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>,
-  HelpText<"Emit metadata containing compiler name and version">;
-def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>,
-  HelpText<"Do not emit metadata containing compiler name and version">;
+def Qn : Flag<["-"], "Qn">, IgnoredGCCCompat;
 def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[DriverOption, CoreOption]>,
   HelpText<"Don't emit warning for unused driver arguments">;
 def Q : Flag<["-"], "Q">, IgnoredGCCCompat;

Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=330451&r1=330450&r2=330451&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.def (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def Fri Apr 20 10:14:39 2018
@@ -69,7 +69,6 @@ CODEGENOPT(EmitDeclMetadata  , 1, 0) ///
                                      ///< Decl* various IR entities came from.
                                      ///< Only useful when running CodeGen as a
                                      ///< subroutine.
-CODEGENOPT(EmitVersionIdentMetadata , 1, 1) ///< Emit compiler version metadata.
 CODEGENOPT(EmitGcovArcs      , 1, 0) ///< Emit coverage data files, aka. GCDA.
 CODEGENOPT(EmitGcovNotes     , 1, 0) ///< Emit coverage "notes" files, aka GCNO.
 CODEGENOPT(EmitOpenCLArgMetadata , 1, 0) ///< Emit OpenCL kernel arg metadata.

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=330451&r1=330450&r2=330451&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Apr 20 10:14:39 2018
@@ -577,8 +577,7 @@ void CGDebugInfo::CreateCompileUnit() {
                           remapDIPath(getCurrentDirname()),
                           CSInfo,
                           getSource(SM, SM.getMainFileID())),
-      CGOpts.EmitVersionIdentMetadata ? Producer : "",
-      LO.Optimize || CGOpts.PrepareForLTO || CGOpts.EmitSummaryIndex,
+      Producer, LO.Optimize || CGOpts.PrepareForLTO || CGOpts.EmitSummaryIndex,
       CGOpts.DwarfDebugFlags, RuntimeVers,
       CGOpts.EnableSplitDwarf ? "" : CGOpts.SplitDwarfFile, EmissionKind,
       0 /* DWOid */, CGOpts.SplitDwarfInlining, CGOpts.DebugInfoForProfiling,

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=330451&r1=330450&r2=330451&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri Apr 20 10:14:39 2018
@@ -571,8 +571,7 @@ void CodeGenModule::Release() {
   if (DebugInfo)
     DebugInfo->finalize();
 
-  if (getCodeGenOpts().EmitVersionIdentMetadata)
-    EmitVersionIdentMetadata();
+  EmitVersionIdentMetadata();
 
   EmitTargetMetadata();
 }

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=330451&r1=330450&r2=330451&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Apr 20 10:14:39 2018
@@ -4408,9 +4408,6 @@ void Clang::ConstructJob(Compilation &C,
     }
   }
 
-  if (!Args.hasFlag(options::OPT_Qy, options::OPT_Qn, true))
-    CmdArgs.push_back("-Qn");
-
   // -fcommon is the default unless compiling kernel code or the target says so
   bool NoCommonDefault = KernelOrKext || isNoCommonDefault(RawTriple);
   if (!Args.hasFlag(options::OPT_fcommon, options::OPT_fno_common,

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=330451&r1=330450&r2=330451&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Apr 20 10:14:39 2018
@@ -1112,8 +1112,6 @@ static bool ParseCodeGenArgs(CodeGenOpti
   Opts.EmitCheckPathComponentsToStrip = getLastArgIntValue(
       Args, OPT_fsanitize_undefined_strip_path_components_EQ, 0, Diags);
 
-  Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true);
-
   return Success;
 }
 

Removed: cfe/trunk/test/CodeGen/no-ident-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/no-ident-version.c?rev=330450&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/no-ident-version.c (original)
+++ cfe/trunk/test/CodeGen/no-ident-version.c (removed)
@@ -1,19 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o - %s \
-// RUN:   | FileCheck --check-prefix=CHECK-NONE %s
-// RUN: %clang_cc1 -Qn -emit-llvm -debug-info-kind=limited -o - %s \
-// RUN:   | FileCheck --check-prefix=CHECK-QN %s
-// RUN: %clang_cc1 -Qy -emit-llvm -debug-info-kind=limited -o - %s \
-// RUN:   | FileCheck --check-prefix=CHECK-QY %s
-
-// CHECK-NONE: define i32 @main()
-// CHECK-NONE: llvm.ident
-// CHECK-NONE: producer:
-
-// CHECK-QN: define i32 @main()
-// CHECK-QN-NOT: llvm.ident
-// CHECK-QN-NOT: producer:
-
-// CHECK-QY: define i32 @main()
-// CHECK-QY: llvm.ident
-// CHECK-QY: producer:
-int main(void) {}




More information about the cfe-commits mailing list