]> granicus.if.org Git - clang/commitdiff
Revert r330442, CodeGen/no-ident-version.c is failing on PPC
authorMikhail Maltsev <mikhail.maltsev@arm.com>
Fri, 20 Apr 2018 17:14:39 +0000 (17:14 +0000)
committerMikhail Maltsev <mikhail.maltsev@arm.com>
Fri, 20 Apr 2018 17:14:39 +0000 (17:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330451 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/no-ident-version.c [deleted file]

index 5290d8ad482d0bcaa2485dce0ce07910f6955852..ca6267dad4e3afbce18bfc09d6247a1b80bf5770 100644 (file)
@@ -396,10 +396,7 @@ def O_flag : Flag<["-"], "O">, Flags<[CC1Option]>, Alias<O>, AliasArgs<["2"]>;
 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;
index 1684dbdb5576d062ab8e359b5c78022901c2f73f..684f99e1de308cd6e25d0cd65476789894a764a8 100644 (file)
@@ -69,7 +69,6 @@ CODEGENOPT(EmitDeclMetadata  , 1, 0) ///< Emit special metadata indicating what
                                      ///< 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.
index 474018c065e6aeadd86fbdd5884afc0910df1d41..bdd326d70e4028771d44d9716d31b3d893538e6a 100644 (file)
@@ -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,
index 063b9be4cd026670897e2160151d0dcaa2e7826f..63fcc8fbce0be05049f5c8a66f76222ccff3af45 100644 (file)
@@ -571,8 +571,7 @@ void CodeGenModule::Release() {
   if (DebugInfo)
     DebugInfo->finalize();
 
-  if (getCodeGenOpts().EmitVersionIdentMetadata)
-    EmitVersionIdentMetadata();
+  EmitVersionIdentMetadata();
 
   EmitTargetMetadata();
 }
index 6c5e2caae4acda894f3fc4a72bd84cb89403cffe..a3cb0f21ed557328450a8f8bdc6ac5ac2d049d0e 100644 (file)
@@ -4408,9 +4408,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     }
   }
 
-  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,
index f904e65e7243d34fe6cd740c9e847091fe5ffbc0..67e15b41add119b54d073c39cd455900780d9b61 100644 (file)
@@ -1112,8 +1112,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.EmitCheckPathComponentsToStrip = getLastArgIntValue(
       Args, OPT_fsanitize_undefined_strip_path_components_EQ, 0, Diags);
 
-  Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true);
-
   return Success;
 }
 
diff --git a/test/CodeGen/no-ident-version.c b/test/CodeGen/no-ident-version.c
deleted file mode 100644 (file)
index 35f84f0..0000000
+++ /dev/null
@@ -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) {}