1. 30 May, 2018 5 commits
  2. 29 May, 2018 24 commits
  3. 28 May, 2018 4 commits
  4. 27 May, 2018 1 commit
    • Ian Lance Taylor's avatar
      cmd/go: don't generate output for "go build -o /dev/null x.go" · c1d9d1f3
      Ian Lance Taylor authored
      We look for "-o /dev/null", and, if found, pretend that there was no
      "-o" option and don't generate an action to create the final executable.
      
      We look for "go build x.go", and, if found, and if -o was not used,
      pretend that the user specified "-o x".
      
      Unfortunately, we were doing those in the wrong order, so that "go
      build -o /dev/null x.go" would first clear the "-o" option and then
      set it to "-o x".
      
      This CL flips the order so that the right thing happens.
      
      Fixes #25579
      
      Change-Id: Ic9556ac0a57f7b45b685951bc96ba5ea4633b860
      Reviewed-on: https://go-review.googlesource.com/114715
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c1d9d1f3
  5. 26 May, 2018 5 commits
  6. 25 May, 2018 1 commit
    • Than McIntosh's avatar
      cmd/compile: fix DWARF inline debug issue with dead local vars · 1ba26a33
      Than McIntosh authored
      Fix a problem in DWARF inline debug generation relating to handling of
      statically unreachable local variables. For a function such as:
      
          const always = true
      
          func HasDeadLocal() int {
            if always {
              return 9
            }
            x := new(Something)
            ...
            return x.y
          }
      
      the variable "x" is placed onto the Dcl list for the function during
      parsing, but the actual declaration node is deleted later on when
      gc.Main invokes "deadcode". Later in the compile the DWARF code emits
      an abstract function with "x" (since "x" was on the Dcl list at the
      point of the inline), but the export data emitted does not contain
      "x". This then creates clashing/inconsistant DWARF abstract function
      DIEs later on if HasDeadLocal is inlined in somewhere else.
      
      As a fix, the inliner now pruned away variables such as "x" when
      creating a copy of the Dcl list as part of the inlining; this means
      that both the export data generator and the DWARF emitter wind up
      seeing a consistent picture.
      
      Fixes #25459
      
      Change-Id: I753dc4e9f9ec694340adba5f43c907ba8cc9badc
      Reviewed-on: https://go-review.googlesource.com/114090
      Run-TryBot: Than McIntosh <thanm@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarHeschi Kreinick <heschi@google.com>
      1ba26a33