Commit 91bb72a3 authored by Ayke van Laethem's avatar Ayke van Laethem
Browse files

[bindings/go][NFC] Format code with go fmt

Run go fmt (version 1.12) over the Go bindings. This cleans up lots of
inconsistencies in the code, it does not change the code in a functional
way.

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

llvm-svn: 363148
parent 61de6a4e
Loading
Loading
Loading
Loading
+48 −47
Original line number Diff line number Diff line
@@ -422,11 +422,11 @@ func (a Attribute) GetStringValue() string {
}

func (a Attribute) IsEnum() bool {
  return C.LLVMIsEnumAttribute(a.C) != 0;
	return C.LLVMIsEnumAttribute(a.C) != 0
}

func (a Attribute) IsString() bool {
  return C.LLVMIsStringAttribute(a.C) != 0;
	return C.LLVMIsStringAttribute(a.C) != 0
}

//-------------------------------------------------------------------------
@@ -1153,7 +1153,7 @@ func (v Value) AddAttributeAtIndex(i int, a Attribute) {
	C.LLVMAddAttributeAtIndex(v.C, C.LLVMAttributeIndex(i), a.C)
}
func (v Value) AddFunctionAttr(a Attribute) {
  v.AddAttributeAtIndex(C.LLVMAttributeFunctionIndex, a);
	v.AddAttributeAtIndex(C.LLVMAttributeFunctionIndex, a)
}
func (v Value) GetEnumAttributeAtIndex(i int, kind uint) (a Attribute) {
	a.C = C.LLVMGetEnumAttributeAtIndex(v.C, C.LLVMAttributeIndex(i), C.unsigned(kind))
@@ -1173,7 +1173,7 @@ func (v Value) RemoveEnumAttributeAtIndex(i int, kind uint) {
	C.LLVMRemoveEnumAttributeAtIndex(v.C, C.LLVMAttributeIndex(i), C.unsigned(kind))
}
func (v Value) RemoveEnumFunctionAttribute(kind uint) {
  v.RemoveEnumAttributeAtIndex(C.LLVMAttributeFunctionIndex, kind);
	v.RemoveEnumAttributeAtIndex(C.LLVMAttributeFunctionIndex, kind)
}
func (v Value) RemoveStringAttributeAtIndex(i int, kind string) {
	ckind := C.CString(kind)
@@ -1355,6 +1355,7 @@ type DebugLoc struct {
	Scope     Metadata
	InlinedAt Metadata
}

func (b Builder) SetCurrentDebugLocation(line, col uint, scope, inlinedAt Metadata) {
	C.LLVMGoSetCurrentDebugLocation(b.C, C.unsigned(line), C.unsigned(col), scope.C, inlinedAt.C)
}
+13 −13

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.