Commit Graph

10 Commits

Author SHA1 Message Date
Chandler Carruth 2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
Andrew Wilkins 78ac1f1d42 [llgo] set debuglocs for calls in synthetic functions
Synthesized functions do not have valid locations,
and so we were not setting a debug location. Recent
changes to DI require that function call instructions
within a function having DI must have a location set.
We just set the debug location to line=0, col=0.

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22905

llvm-svn: 288772
2016-12-06 05:39:14 +00:00
Meador Inge 7695d8996f [llgo] Fix `debug` to use latest `DIBuilder` bindings
Two recent commits to the LLVM Go bindings caused breaking changes
to llgo:

  1. r284707 - Moving the `AlignInBits` field from `DIBasicType` to
               `DIAutoVariable`.

  2. r284482 - The `AlignInBits` fields going from `uint64` to `uint32`.

This commit updates llgo accordingly.

llvm-svn: 288768
2016-12-06 04:00:12 +00:00
Andrew Wilkins 0f432aa05a [llgo] Increment "Debug Info Version"
Patch by Michal Cierniak!

This patch increments the "Debug Info Version" from 2 to 3.
This is a nop if you just want to generate binaries. I verified
that with and without this patch, when I run llgo -g on a Go
source file, I get exactly the same binary. The purpose of the
patch is to make it possible to run the llvm-dis tool. Without
the patch, it is impossible to disassemble files generated with
llgo:

  $ llgo -c -g -emit-llvm src/hello.go
  $ llvm-dis hello.o
  llvm-dis: warning: ignoring debug info with an invalid version (2) in hello.o

Differential Revision: http://reviews.llvm.org/D18355

llvm-svn: 264212
2016-03-23 23:09:00 +00:00
Peter Collingbourne 8324851a4e debug: Update for debug info API change.
llvm-svn: 252221
2015-11-05 22:04:20 +00:00
Andrew Wilkins 3b138079c9 [llgo] drop debug/DIBuilder.Declare
Summary:
Companion to D11864, which updates the
DIBuilder bindings to match a recent
change in the underlying API.

We drop the debug/DIBuilder.Declare method
for now, which is unused, as otherwise it will
be broken with the new DIBuilder API in the
Go bindings.

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11891

llvm-svn: 246545
2015-09-01 11:52:37 +00:00
Andrew Wilkins ac15169034 [llgo] debug: create replaceable type through DIBuilder
Summary:
llgo was asserting in DebugInfo, which was interpreting
the temporary MDNodes we were creating as DIScopes instead
of DITypes (in DIScope::getRef).

This proposal changes llgo to use DIBuilder's
createReplaceableCompositeType method to create a DIType
that can be RAUW'd.

Reviewers: pcc

Reviewed By: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7852

llvm-svn: 230953
2015-03-02 12:42:45 +00:00
Peter Collingbourne 56109b78c7 Roll gotools to 47f2109c.
At the same time, perform a number of simplifications:

- Rename go.tools directory to gotools.

- Import only the go directory; all required Go analysis code and
  its dependencies have now been moved to this directory.

llvm-svn: 225825
2015-01-13 20:45:08 +00:00
Peter Collingbourne 8bcc05d5f4 Update to new bindings.
llvm-svn: 224180
2014-12-13 02:26:00 +00:00
Peter Collingbourne ad9841e8ac Initial commit of llgo.
llvm-svn: 222857
2014-11-27 00:06:42 +00:00