1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Wilkins
db2a769c11 [Go] Subtypes function
This patch adds LLVMGetSubtypes to Go API (as Type.Subtypes), tests included.

Patch by Ekaterina Vaartis!

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

llvm-svn: 304968
2017-06-08 07:32:29 +00:00
Andrew Wilkins
1d34613c6f Go binding: Add GetCurrentDebugLocation to obtain debug location from builder
Summary:

Currently Go binding only has SetCurrentDebugLocation method.
I added GetCurrentDebugLocation method to IRBuilder instance.

I added this because I want to save current debug location, change debug location temporary and restore the saved one finally.
This is useful when source location jumps and goes back after while LLVM IR generation.

I also added tests for this to ir_test.go.
I confirmed that all test passed with this patch based on r298890

Patch by Ryuichi Hayashida!

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

llvm-svn: 299185
2017-03-31 04:59:57 +00:00
Amaury Sechet
9416bb4ccb Fix go binding to adapt the new attribute API
https://reviews.llvm.org/D26339

llvm-svn: 287328
2016-11-18 10:11:02 +00:00
David L. Jones
f2ffb620a9 Remove Go Attribute type that was deleted from the C API in r286062.
Summary:
The C++ side of the Go bindings were updated in r286085, r286086, and r286087,
but those did not remove this type.

Reviewers: djasper

Subscribers: axw

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

llvm-svn: 286131
2016-11-07 18:38:49 +00:00
Daniel Jasper
7bf94da7e9 Also delete the go side of the bindings deleted in r286085/r286086.
Also delete a comment I forgot to delete.

llvm-svn: 286087
2016-11-06 23:21:22 +00:00
Peter Collingbourne
5b721561aa DI: Reverse direction of subprogram -> function edge.
Previously, subprograms contained a metadata reference to the function they
described. Because most clients need to get or set a subprogram for a given
function rather than the other way around, this created unneeded inefficiency.

For example, many passes needed to call the function llvm::makeSubprogramMap()
to build a mapping from functions to subprograms, and the IR linker needed to
fix up function references in a way that caused quadratic complexity in the IR
linking phase of LTO.

This change reverses the direction of the edge by storing the subprogram as
function-level metadata and removing DISubprogram's function field.

Since this is an IR change, a bitcode upgrade has been provided.

Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is
attached to the PR.

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

llvm-svn: 252219
2015-11-05 22:03:56 +00:00
Reid Kleckner
ccbed5d48c Revert "Update LLVM bindings after r239940. ..."
Revert the changes to the C API LLVMBuildLandingPad that were part of
the personality function move. We now set the personality on the parent
function when the C API attempts to construct a landingpad with a
personality.

This reverts commit r240010.

llvm-svn: 242372
2015-07-16 01:16:39 +00:00
Andrew Wilkins
ac853547d8 Expose setPersonalityFn to Go
Summary:
Add Value.SetPersonality to the Go bindings. The Go
bindings' Builder.CreateLandingPad has been updated,
removing the obsolete personality argument.

Background

The personality attribute was removed from LandingPadInst
in r239940, and llvm::Function::setPersonalityFn introduced.

There was no corresponding change to either the C API or
Go bindings. The Go bindings were broken until r239940, but
that change was just to ignore the personality argument.
This broke llgo.

Reviewers: majnemer, pcc

Subscribers: deadalnix, llvm-commits, axw

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

llvm-svn: 242289
2015-07-15 13:03:08 +00:00
Daniel Jasper
e7464919b8 Update LLVM bindings after r239940. Apparently these aren't included in
any tests and I even don't know how to run the tests. This seems like a
minimal change to make them work again, although I can't really verify
at this point. Additionally, it probably makes sense to propagate the
personality parameter removal further.

llvm-svn: 240010
2015-06-18 11:51:16 +00:00
Peter Collingbourne
cb037f41a1 Add safestack attribute to LLVMAttribute enum and Go bindings. Correct
constants in commented-out part of LLVMAttribute enum. Add tests that verify
that the safestack attribute is only allowed as a function attribute.

llvm-svn: 239772
2015-06-15 22:16:51 +00:00
Peter Collingbourne
429456643c Go bindings: introduce Value.ConstantAsMetadata.
llvm-svn: 224179
2014-12-13 02:25:57 +00:00
Peter Collingbourne
bcdc22d6ac Go bindings: introduce llvm.TemporaryMDNode.
llvm-svn: 224178
2014-12-13 02:25:54 +00:00
Peter Collingbourne
35ba0efe81 Go bindings: introduce Metadata.ReplaceAllUsesWith.
llvm-svn: 224177
2014-12-13 02:25:51 +00:00
Peter Collingbourne
1b01b3d54e Go bindings: expose the Metadata type.
Also modifies SetCurrentDebugLocation to take individual arguments rather
than an MDNode.

llvm-svn: 224176
2014-12-13 02:25:49 +00:00
Peter Collingbourne
d742e77547 Go bindings: remove contextless metadata bindings.
llvm-svn: 224175
2014-12-13 02:25:45 +00:00
Peter Collingbourne
995034d1b1 Go: add binding for LLVMSetUnnamedAddr.
llvm-svn: 220416
2014-10-22 20:20:27 +00:00
Peter Collingbourne
22590da2c9 Initial version of Go bindings.
This code is based on the existing LLVM Go bindings project hosted at:
https://github.com/go-llvm/llvm

Note that all contributors to the gollvm project have agreed to relicense
their changes under the LLVM license and submit them to the LLVM project.

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

llvm-svn: 219976
2014-10-16 22:48:02 +00:00