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.

Thanks,
- Dave

On Mon, Sep 24, 2018 at 11:25 AM Calixte Denizet via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

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

Reply via email to