<div dir="ltr">When reverting patches it's helpful to include some context (links to buildbots, plus inline/textual descriptions of errors, etc) for why the change is being made - so people looking to explain the failure they're seeing can see if this change is intended to address it, or if someone's going back to see why a certain patch didn't stick (or evaluate if the problems have been addressed so it can be recommitted, etc), etc.<br><br>Thanks,<br>- Dave</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 24, 2018 at 11:25 AM Calixte Denizet via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: calixte<br>
Date: Mon Sep 24 11:24:18 2018<br>
New Revision: 342912<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=342912&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=342912&view=rev</a><br>
Log:<br>
[CodeGen] Revert commit <a href="https://reviews.llvm.org/rL342717" rel="noreferrer" target="_blank">https://reviews.llvm.org/rL342717</a><br>
<br>
Modified:<br>
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br>
    cfe/trunk/lib/CodeGen/CGDebugInfo.h<br>
    cfe/trunk/lib/CodeGen/CGException.cpp<br>
    cfe/trunk/lib/CodeGen/CodeGenFunction.cpp<br>
    cfe/trunk/lib/CodeGen/CodeGenFunction.h<br>
    cfe/trunk/test/CodeGen/debug-info-scope-file.c<br>
    cfe/trunk/test/CodeGenCXX/debug-info-inheriting-constructor.cpp<br>
    cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp<br>
    cfe/trunk/test/CodeGenObjC/arc-linetable.m<br>
    cfe/trunk/test/CodeGenObjC/debug-info-blocks.m<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Sep 24 11:24:18 2018<br>
@@ -76,22 +76,20 @@ CGDebugInfo::~CGDebugInfo() {<br>
 }<br>
<br>
 ApplyDebugLocation::ApplyDebugLocation(CodeGenFunction &CGF,<br>
-                                       SourceLocation TemporaryLocation,<br>
-                                       bool ImplicitCode)<br>
+                                       SourceLocation TemporaryLocation)<br>
     : CGF(&CGF) {<br>
-  init(TemporaryLocation, false /* DefaultToEmpty */, ImplicitCode);<br>
+  init(TemporaryLocation);<br>
 }<br>
<br>
 ApplyDebugLocation::ApplyDebugLocation(CodeGenFunction &CGF,<br>
                                        bool DefaultToEmpty,<br>
-                                       SourceLocation TemporaryLocation,<br>
-                                       bool ImplicitCode)<br>
+                                       SourceLocation TemporaryLocation)<br>
     : CGF(&CGF) {<br>
-  init(TemporaryLocation, DefaultToEmpty, ImplicitCode);<br>
+  init(TemporaryLocation, DefaultToEmpty);<br>
 }<br>
<br>
 void ApplyDebugLocation::init(SourceLocation TemporaryLocation,<br>
-                              bool DefaultToEmpty, bool ImplicitCode) {<br>
+                              bool DefaultToEmpty) {<br>
   auto *DI = CGF->getDebugInfo();<br>
   if (!DI) {<br>
     CGF = nullptr;<br>
@@ -104,7 +102,7 @@ void ApplyDebugLocation::init(SourceLoca<br>
     return;<br>
<br>
   if (TemporaryLocation.isValid()) {<br>
-    DI->EmitLocation(CGF->Builder, TemporaryLocation, ImplicitCode);<br>
+    DI->EmitLocation(CGF->Builder, TemporaryLocation);<br>
     return;<br>
   }<br>
<br>
@@ -3486,8 +3484,7 @@ void CGDebugInfo::EmitInlineFunctionEnd(<br>
   setInlinedAt(llvm::DebugLoc(CurInlinedAt).getInlinedAt());<br>
 }<br>
<br>
-void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc,<br>
-                               bool ImplicitCode) {<br>
+void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc) {<br>
   // Update our current location<br>
   setLocation(Loc);<br>
<br>
@@ -3495,9 +3492,8 @@ void CGDebugInfo::EmitLocation(CGBuilder<br>
     return;<br>
<br>
   llvm::MDNode *Scope = LexicalBlockStack.back();<br>
-  Builder.SetCurrentDebugLocation(<br>
-      llvm::DebugLoc::get(getLineNumber(CurLoc), getColumnNumber(CurLoc), Scope,<br>
-                          CurInlinedAt, ImplicitCode));<br>
+  Builder.SetCurrentDebugLocation(llvm::DebugLoc::get(<br>
+      getLineNumber(CurLoc), getColumnNumber(CurLoc), Scope, CurInlinedAt));<br>
 }<br>
<br>
 void CGDebugInfo::CreateLexicalBlock(SourceLocation Loc) {<br>
@@ -3544,7 +3540,7 @@ void CGDebugInfo::EmitLexicalBlockEnd(CG<br>
   assert(!LexicalBlockStack.empty() && "Region stack mismatch, stack empty!");<br>
<br>
   // Provide an entry in the line table for the end of the block.<br>
-  EmitLocation(Builder, Loc, true /* ImplicitCode */);<br>
+  EmitLocation(Builder, Loc);<br>
<br>
   if (DebugKind <= codegenoptions::DebugLineTablesOnly)<br>
     return;<br>
@@ -3560,7 +3556,7 @@ void CGDebugInfo::EmitFunctionEnd(CGBuil<br>
   // Pop all regions for this function.<br>
   while (LexicalBlockStack.size() != RCount) {<br>
     // Provide an entry in the line table for the end of the block.<br>
-    EmitLocation(Builder, CurLoc, true /* ImplicitCode */);<br>
+    EmitLocation(Builder, CurLoc);<br>
     LexicalBlockStack.pop_back();<br>
   }<br>
   FnBeginRegionCount.pop_back();<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)<br>
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Mon Sep 24 11:24:18 2018<br>
@@ -377,9 +377,7 @@ public:<br>
   /// Emit metadata to indicate a change in line/column information in<br>
   /// the source file. If the location is invalid, the previous<br>
   /// location will be reused.<br>
-  /// \param ImplicitCode  True if the Loc must have coverage information<br>
-  void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc,<br>
-                    bool ImplicitCode = false);<br>
+  void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc);<br>
<br>
   /// Emit a call to llvm.dbg.function.start to indicate<br>
   /// start of a new function.<br>
@@ -666,19 +664,16 @@ private:<br>
 /// location or preferred location of the specified Expr.<br>
 class ApplyDebugLocation {<br>
 private:<br>
-  void init(SourceLocation TemporaryLocation, bool DefaultToEmpty = false,<br>
-            bool ImplicitCode = false);<br>
+  void init(SourceLocation TemporaryLocation, bool DefaultToEmpty = false);<br>
   ApplyDebugLocation(CodeGenFunction &CGF, bool DefaultToEmpty,<br>
-                     SourceLocation TemporaryLocation,<br>
-                     bool ImplicitCode = false);<br>
+                     SourceLocation TemporaryLocation);<br>
<br>
   llvm::DebugLoc OriginalLocation;<br>
   CodeGenFunction *CGF;<br>
<br>
 public:<br>
   /// Set the location to the (valid) TemporaryLocation.<br>
-  ApplyDebugLocation(CodeGenFunction &CGF, SourceLocation TemporaryLocation,<br>
-                     bool ImplicitCode = false);<br>
+  ApplyDebugLocation(CodeGenFunction &CGF, SourceLocation TemporaryLocation);<br>
   ApplyDebugLocation(CodeGenFunction &CGF, const Expr *E);<br>
   ApplyDebugLocation(CodeGenFunction &CGF, llvm::DebugLoc Loc);<br>
   ApplyDebugLocation(ApplyDebugLocation &&Other) : CGF(Other.CGF) {<br>
@@ -701,15 +696,13 @@ public:<br>
   static ApplyDebugLocation CreateArtificial(CodeGenFunction &CGF) {<br>
     return ApplyDebugLocation(CGF, false, SourceLocation());<br>
   }<br>
-<br>
   /// Apply TemporaryLocation if it is valid. Otherwise switch<br>
   /// to an artificial debug location that has a valid scope, but no<br>
   /// line information.<br>
   static ApplyDebugLocation<br>
   CreateDefaultArtificial(CodeGenFunction &CGF,<br>
-                          SourceLocation TemporaryLocation,<br>
-                          bool ImplicitCode = false) {<br>
-    return ApplyDebugLocation(CGF, false, TemporaryLocation, ImplicitCode);<br>
+                          SourceLocation TemporaryLocation) {<br>
+    return ApplyDebugLocation(CGF, false, TemporaryLocation);<br>
   }<br>
<br>
   /// Set the IRBuilder to not attach debug locations.  Note that<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGException.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGException.cpp Mon Sep 24 11:24:18 2018<br>
@@ -767,8 +767,7 @@ llvm::BasicBlock *CodeGenFunction::EmitL<br>
<br>
   // Save the current IR generation state.<br>
   CGBuilderTy::InsertPoint savedIP = Builder.saveAndClearIP();<br>
-  auto DL = ApplyDebugLocation::CreateDefaultArtificial(<br>
-      *this, CurEHLocation, true /* ImplicitCode */);<br>
+  auto DL = ApplyDebugLocation::CreateDefaultArtificial(*this, CurEHLocation);<br>
<br>
   // Create and configure the landing pad.<br>
   llvm::BasicBlock *lpad = createBasicBlock("lpad");<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Mon Sep 24 11:24:18 2018<br>
@@ -317,7 +317,7 @@ void CodeGenFunction::FinishFunction(Sou<br>
     if (OnlySimpleReturnStmts)<br>
       DI->EmitLocation(Builder, LastStopPoint);<br>
     else<br>
-      DI->EmitLocation(Builder, EndLoc, true /* ImplicitCode */);<br>
+      DI->EmitLocation(Builder, EndLoc);<br>
   }<br>
<br>
   // Pop any cleanups that might have been associated with the<br>
@@ -333,7 +333,7 @@ void CodeGenFunction::FinishFunction(Sou<br>
     // the ret after it's been at EndLoc.<br>
     if (CGDebugInfo *DI = getDebugInfo())<br>
       if (OnlySimpleReturnStmts)<br>
-        DI->EmitLocation(Builder, EndLoc, true /* ImplicitCode */);<br>
+        DI->EmitLocation(Builder, EndLoc);<br>
<br>
     PopCleanupBlocks(PrologueCleanupDepth);<br>
   }<br>
@@ -1179,7 +1179,7 @@ void CodeGenFunction::StartFunction(Glob<br>
   }<br>
   // Emit a location at the end of the prologue.<br>
   if (CGDebugInfo *DI = getDebugInfo())<br>
-    DI->EmitLocation(Builder, StartLoc, true /* ImplicitCode */);<br>
+    DI->EmitLocation(Builder, StartLoc);<br>
<br>
   // TODO: Do we need to handle this in two places like we do with<br>
   // target-features/target-cpu?<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Mon Sep 24 11:24:18 2018<br>
@@ -786,7 +786,7 @@ public:<br>
       // If we should perform a cleanup, force them now.  Note that<br>
       // this ends the cleanup scope before rescoping any labels.<br>
       if (PerformCleanup) {<br>
-        ApplyDebugLocation DL(CGF, Range.getEnd(), true /* ImplicitCode */);<br>
+        ApplyDebugLocation DL(CGF, Range.getEnd());<br>
         ForceCleanup();<br>
       }<br>
     }<br>
<br>
Modified: cfe/trunk/test/CodeGen/debug-info-scope-file.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-scope-file.c?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-scope-file.c?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/debug-info-scope-file.c (original)<br>
+++ cfe/trunk/test/CodeGen/debug-info-scope-file.c Mon Sep 24 11:24:18 2018<br>
@@ -5,11 +5,10 @@<br>
<br>
 // CHECK: ret void, !dbg [[F1_LINE:![0-9]*]]<br>
 // CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]<br>
-// CHECK: [[F1:![0-9]*]] = distinct !DISubprogram(name: "f1",{{.*}}<br>
-// isDefinition: true CHECK: [[F1_LINE]] = !DILocation({{.*}}, scope: [[F1]],<br>
-// isImplicitCode: true) CHECK: [[F2:![0-9]*]] = distinct !DISubprogram(name:<br>
-// "f2",{{.*}} isDefinition: true CHECK: [[F2_LINE]] = !DILocation({{.*}},<br>
-// scope: [[F2]], isImplicitCode: true)<br>
+// CHECK: [[F1:![0-9]*]] = distinct !DISubprogram(name: "f1",{{.*}} isDefinition: true<br>
+// CHECK: [[F1_LINE]] = !DILocation({{.*}}, scope: [[F1]])<br>
+// CHECK: [[F2:![0-9]*]] = distinct !DISubprogram(name: "f2",{{.*}} isDefinition: true<br>
+// CHECK: [[F2_LINE]] = !DILocation({{.*}}, scope: [[F2]])<br>
<br>
 void f1() {<br>
 }<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/debug-info-inheriting-constructor.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-inheriting-constructor.cpp?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-inheriting-constructor.cpp?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenCXX/debug-info-inheriting-constructor.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/debug-info-inheriting-constructor.cpp Mon Sep 24 11:24:18 2018<br>
@@ -21,5 +21,5 @@ void foo() {<br>
 // CHECK-DAG: ![[LOC]] = !DILocation(line: 0, scope: ![[A]], inlinedAt: ![[INL:[0-9]+]])<br>
 // CHECK-DAG: ![[INL]] = !DILocation(line: [[@LINE+1]], scope: ![[FOO]])<br>
   B b(0);<br>
-  // CHECK: ![[NOINL]] = !DILocation(line: [[@LINE+1]], scope: !{{[0-9]+}}, isImplicitCode: true)<br>
+// CHECK: ![[NOINL]] = !DILocation(line: [[@LINE+1]], scope: !{{[0-9]+}})<br>
 }<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/linetable-virtual-variadic.cpp Mon Sep 24 11:24:18 2018<br>
@@ -17,6 +17,6 @@ void Derived::VariadicFunction(...) { }<br>
 // CHECK: ret void, !dbg ![[LOC_I:[0-9]+]]<br>
 //<br>
 // CHECK: ![[SP]] = distinct !DISubprogram(name: "VariadicFunction"<br>
-// CHECK: ![[LOC]] = !DILocation({{.*}}scope: ![[SP]], isImplicitCode: true)<br>
+// CHECK: ![[LOC]] = !DILocation({{.*}}scope: ![[SP]])<br>
 // CHECK: ![[SP_I]] = distinct !DISubprogram(name: "VariadicFunction"<br>
-// CHECK: ![[LOC_I]] = !DILocation({{.*}}scope: ![[SP_I]], isImplicitCode: true)<br>
+// CHECK: ![[LOC_I]] = !DILocation({{.*}}scope: ![[SP_I]])<br>
<br>
Modified: cfe/trunk/test/CodeGenObjC/arc-linetable.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-linetable.m?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-linetable.m?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjC/arc-linetable.m (original)<br>
+++ cfe/trunk/test/CodeGenObjC/arc-linetable.m Mon Sep 24 11:24:18 2018<br>
@@ -60,7 +60,7 @@ typedef signed char BOOL;<br>
 - (int)testNoSideEffect:(NSString *)foo {<br>
   int x = 1;<br>
   return 1; // Return expression<br>
-  // CHECK: ![[RET1]] = !DILocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]], isImplicitCode: true)<br>
+  // CHECK: ![[RET1]] = !DILocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]])<br>
 }           // Cleanup + Ret<br>
<br>
 - (int)testNoCleanup {<br>
<br>
Modified: cfe/trunk/test/CodeGenObjC/debug-info-blocks.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-blocks.m?rev=342912&r1=342911&r2=342912&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-blocks.m?rev=342912&r1=342911&r2=342912&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenObjC/debug-info-blocks.m (original)<br>
+++ cfe/trunk/test/CodeGenObjC/debug-info-blocks.m Mon Sep 24 11:24:18 2018<br>
@@ -18,9 +18,11 @@<br>
 // CHECK: call {{.*}}, !dbg ![[DBG_LINE:[0-9]+]]<br>
 // CHECK-NOT: ret<br>
 // CHECK: load {{.*}}, !dbg ![[COPY_LINE:[0-9]+]]<br>
+// CHECK: ret void, !dbg ![[COPY_LINE]]<br>
 // CHECK: define {{.*}} @__destroy_helper_block_{{.*}}(i8*)<br>
 // CHECK-NOT: ret<br>
 // CHECK: load {{.*}}, !dbg ![[DESTROY_LINE:[0-9]+]]<br>
+// CHECK: ret void, !dbg ![[DESTROY_LINE]]<br>
<br>
 typedef unsigned int NSUInteger;<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>