Skip to content

Commit

Permalink
Also delete the go side of the bindings deleted in r286085/r286086.
Browse files Browse the repository at this point in the history
Also delete a comment I forgot to delete.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286087 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
djasper-gh committed Nov 6, 2016
1 parent 5183128 commit cb096f0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 180 deletions.
5 changes: 0 additions & 5 deletions bindings/go/llvm/IRBindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ extern "C" {

typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;

// These functions duplicate the LLVM*FunctionAttr functions in the stable C
// API. We cannot use the existing functions because they take 32-bit attribute
// values, and the Go bindings expose all of the LLVM attributes, some of which
// have values >= 1<<32.

LLVMMetadataRef LLVMConstantAsMetadata(LLVMValueRef Val);

LLVMMetadataRef LLVMMDString2(LLVMContextRef C, const char *Str, unsigned SLen);
Expand Down
78 changes: 0 additions & 78 deletions bindings/go/llvm/ir.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,56 +114,6 @@ func llvmMetadataRefs(mds []Metadata) (*C.LLVMMetadataRef, C.unsigned) {
return pt, ptlen
}

//-------------------------------------------------------------------------
// llvm.Attribute
//-------------------------------------------------------------------------

const (
NoneAttribute Attribute = 0
ZExtAttribute Attribute = C.LLVMZExtAttribute
SExtAttribute Attribute = C.LLVMSExtAttribute
NoReturnAttribute Attribute = C.LLVMNoReturnAttribute
InRegAttribute Attribute = C.LLVMInRegAttribute
StructRetAttribute Attribute = C.LLVMStructRetAttribute
NoUnwindAttribute Attribute = C.LLVMNoUnwindAttribute
NoAliasAttribute Attribute = C.LLVMNoAliasAttribute
ByValAttribute Attribute = C.LLVMByValAttribute
NestAttribute Attribute = C.LLVMNestAttribute
ReadNoneAttribute Attribute = C.LLVMReadNoneAttribute
ReadOnlyAttribute Attribute = C.LLVMReadOnlyAttribute
NoInlineAttribute Attribute = C.LLVMNoInlineAttribute
AlwaysInlineAttribute Attribute = C.LLVMAlwaysInlineAttribute
OptimizeForSizeAttribute Attribute = C.LLVMOptimizeForSizeAttribute
StackProtectAttribute Attribute = C.LLVMStackProtectAttribute
StackProtectReqAttribute Attribute = C.LLVMStackProtectReqAttribute
Alignment Attribute = C.LLVMAlignment
NoCaptureAttribute Attribute = C.LLVMNoCaptureAttribute
NoRedZoneAttribute Attribute = C.LLVMNoRedZoneAttribute
NoImplicitFloatAttribute Attribute = C.LLVMNoImplicitFloatAttribute
NakedAttribute Attribute = C.LLVMNakedAttribute
InlineHintAttribute Attribute = C.LLVMInlineHintAttribute
StackAlignment Attribute = C.LLVMStackAlignment
ReturnsTwiceAttribute Attribute = C.LLVMReturnsTwice
UWTableAttribute Attribute = C.LLVMUWTable
NonLazyBindAttribute Attribute = 1 << 31
SanitizeAddressAttribute Attribute = 1 << 32
MinSizeAttribute Attribute = 1 << 33
NoDuplicateAttribute Attribute = 1 << 34
StackProtectStrongAttribute Attribute = 1 << 35
SanitizeThreadAttribute Attribute = 1 << 36
SanitizeMemoryAttribute Attribute = 1 << 37
NoBuiltinAttribute Attribute = 1 << 38
ReturnedAttribute Attribute = 1 << 39
ColdAttribute Attribute = 1 << 40
BuiltinAttribute Attribute = 1 << 41
OptimizeNoneAttribute Attribute = 1 << 42
InAllocaAttribute Attribute = 1 << 43
NonNullAttribute Attribute = 1 << 44
JumpTableAttribute Attribute = 1 << 45
ConvergentAttribute Attribute = 1 << 46
SafeStackAttribute Attribute = 1 << 47
)

//-------------------------------------------------------------------------
// llvm.Opcode
//-------------------------------------------------------------------------
Expand Down Expand Up @@ -1044,9 +994,6 @@ func (v Value) SetGC(name string) {
defer C.free(unsafe.Pointer(cname))
C.LLVMSetGC(v.C, cname)
}
func (v Value) AddFunctionAttr(a Attribute) { C.LLVMAddFunctionAttr2(v.C, C.uint64_t(a)) }
func (v Value) FunctionAttr() Attribute { return Attribute(C.LLVMGetFunctionAttr2(v.C)) }
func (v Value) RemoveFunctionAttr(a Attribute) { C.LLVMRemoveFunctionAttr2(v.C, C.uint64_t(a)) }
func (v Value) AddTargetDependentFunctionAttr(attr, value string) {
cattr := C.CString(attr)
defer C.free(unsafe.Pointer(cattr))
Expand Down Expand Up @@ -1076,19 +1023,6 @@ func (v Value) FirstParam() (rv Value) { rv.C = C.LLVMGetFirstParam(v.C); retur
func (v Value) LastParam() (rv Value) { rv.C = C.LLVMGetLastParam(v.C); return }
func NextParam(v Value) (rv Value) { rv.C = C.LLVMGetNextParam(v.C); return }
func PrevParam(v Value) (rv Value) { rv.C = C.LLVMGetPreviousParam(v.C); return }
func (v Value) AddAttribute(a Attribute) {
if a >= 1<<32 {
panic("attribute value currently unsupported")
}
C.LLVMAddAttribute(v.C, C.LLVMAttribute(a))
}
func (v Value) RemoveAttribute(a Attribute) {
if a >= 1<<32 {
panic("attribute value currently unsupported")
}
C.LLVMRemoveAttribute(v.C, C.LLVMAttribute(a))
}
func (v Value) Attribute() Attribute { return Attribute(C.LLVMGetAttribute(v.C)) }
func (v Value) SetParamAlignment(align int) { C.LLVMSetParamAlignment(v.C, C.unsigned(align)) }

// Operations on basic blocks
Expand Down Expand Up @@ -1149,18 +1083,6 @@ func (v Value) SetInstructionCallConv(cc CallConv) {
func (v Value) InstructionCallConv() CallConv {
return CallConv(C.LLVMCallConv(C.LLVMGetInstructionCallConv(v.C)))
}
func (v Value) AddInstrAttribute(i int, a Attribute) {
if a >= 1<<32 {
panic("attribute value currently unsupported")
}
C.LLVMAddInstrAttribute(v.C, C.unsigned(i), C.LLVMAttribute(a))
}
func (v Value) RemoveInstrAttribute(i int, a Attribute) {
if a >= 1<<32 {
panic("attribute value currently unsupported")
}
C.LLVMRemoveInstrAttribute(v.C, C.unsigned(i), C.LLVMAttribute(a))
}
func (v Value) SetInstrParamAlignment(i int, align int) {
C.LLVMSetInstrParamAlignment(v.C, C.unsigned(i), C.unsigned(align))
}
Expand Down
97 changes: 0 additions & 97 deletions bindings/go/llvm/ir_test.go

This file was deleted.

0 comments on commit cb096f0

Please sign in to comment.