Skip to content

Commit

Permalink
constant,instruction,types,value: Move packages related to the in-mem…
Browse files Browse the repository at this point in the history
…ory representation of LLVM IR to subdirectories of the ir package.
  • Loading branch information
mewmew committed Jun 21, 2015
1 parent 6a833e3 commit d1d7a46
Show file tree
Hide file tree
Showing 31 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions asm/parser/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strconv"

"github.com/llir/llvm/asm/token"
"github.com/llir/llvm/constant"
"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/constant"
"github.com/llir/llvm/ir/types"
"github.com/mewkiz/pkg/errutil"
)

Expand Down
2 changes: 1 addition & 1 deletion asm/parser/inst.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package parser

import "github.com/llir/llvm/instruction"
import "github.com/llir/llvm/ir/instruction"

// =============================================================================
// Terminator Instructions
Expand Down
2 changes: 1 addition & 1 deletion asm/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/llir/llvm/asm/lexer"
"github.com/llir/llvm/asm/token"
"github.com/llir/llvm/ir"
"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
"github.com/mewkiz/pkg/errutil"
)

Expand Down
2 changes: 1 addition & 1 deletion asm/parser/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/llir/llvm/asm"
"github.com/llir/llvm/asm/token"
"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
"github.com/mewkiz/pkg/errutil"
)

Expand Down
2 changes: 1 addition & 1 deletion ir/basicblock.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ir

import "github.com/llir/llvm/instruction"
import "github.com/llir/llvm/ir/instruction"

// A BasicBlock is a sequence of non-branching instructions, terminated by a
// control flow instruction (such as br or ret).
Expand Down
2 changes: 1 addition & 1 deletion constant/basic.go → ir/constant/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/llir/llvm/internal/math/big"
"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
)

// Int represents an integer constant.
Expand Down
2 changes: 1 addition & 1 deletion constant/constant.go → ir/constant/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Package constant implements values representing immutable LLVM IR constants.
package constant

import "github.com/llir/llvm/value"
import "github.com/llir/llvm/ir/value"

// A Constant represents a value that is immutable at runtime, such as an
// integer or a floating point literal. Pointers known to be immutable at
Expand Down
4 changes: 2 additions & 2 deletions constant/constant_test.go → ir/constant/constant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/llir/llvm/constant"
"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/constant"
"github.com/llir/llvm/ir/types"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion constant/derived.go → ir/constant/derived.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"unicode"
"unicode/utf8"

"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
)

// Vector represents a vector constant which is a vetor containing only
Expand Down
4 changes: 2 additions & 2 deletions constant/expr.go → ir/constant/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package constant
import (
"fmt"

"github.com/llir/llvm/types"
"github.com/llir/llvm/value"
"github.com/llir/llvm/ir/types"
"github.com/llir/llvm/ir/value"
)

// TODO: Complete the list of expression implementations.
Expand Down
2 changes: 1 addition & 1 deletion ir/function.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ir

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// A Function declaration specifies the name and type of a function. A function
// definition contains a set of basic blocks, interconnected by control flow
Expand Down
4 changes: 2 additions & 2 deletions ir/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

"github.com/llir/llvm/asm"
"github.com/llir/llvm/types"
"github.com/llir/llvm/value"
"github.com/llir/llvm/ir/types"
"github.com/llir/llvm/ir/value"
)

// A GlobalDecl represents a global variable definition or an external global
Expand Down
2 changes: 1 addition & 1 deletion instruction/aggregate.go → ir/instruction/aggregate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#aggregate-operations
Expand Down
2 changes: 1 addition & 1 deletion instruction/binary.go → ir/instruction/binary.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#binary-operations
Expand Down
2 changes: 1 addition & 1 deletion instruction/bitwise.go → ir/instruction/bitwise.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#bitwise-binary-operations
Expand Down
2 changes: 1 addition & 1 deletion instruction/conversion.go → ir/instruction/conversion.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#conversion-operations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package instruction declares the instructions of LLVM IR.
package instruction

import "github.com/llir/llvm/value"
import "github.com/llir/llvm/ir/value"

// An Instruction performs a non-branching operation and belongs to one of the
// following groups:
Expand Down
2 changes: 1 addition & 1 deletion instruction/memory.go → ir/instruction/memory.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#memory-access-and-addressing-operations
Expand Down
2 changes: 1 addition & 1 deletion instruction/other.go → ir/instruction/other.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#other-operations
Expand Down
4 changes: 2 additions & 2 deletions instruction/terminator.go → ir/instruction/terminator.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package instruction

import (
"github.com/llir/llvm/types"
"github.com/llir/llvm/value"
"github.com/llir/llvm/ir/types"
"github.com/llir/llvm/ir/value"
)

// A Terminator is a control flow instruction (e.g. br, ret, …) which terminates
Expand Down
2 changes: 1 addition & 1 deletion instruction/vector.go → ir/instruction/vector.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package instruction

import "github.com/llir/llvm/types"
import "github.com/llir/llvm/ir/types"

// References:
// http://llvm.org/docs/LangRef.html#vector-operations
Expand Down
2 changes: 1 addition & 1 deletion ir/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/llir/llvm/asm"
"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
)

// A Module contains top-level type definitions, global variables, function
Expand Down
6 changes: 3 additions & 3 deletions ir/terminator.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ir

import (
"github.com/llir/llvm/constant"
"github.com/llir/llvm/types"
"github.com/llir/llvm/value"
"github.com/llir/llvm/ir/constant"
"github.com/llir/llvm/ir/types"
"github.com/llir/llvm/ir/value"
)

// =============================================================================
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion types/types_test.go → ir/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
)

// Types used by test cases.
Expand Down
2 changes: 1 addition & 1 deletion value/value.go → ir/value/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package value
import (
"fmt"

"github.com/llir/llvm/types"
"github.com/llir/llvm/ir/types"
)

// TODO: Complete the list of value implementations.
Expand Down

0 comments on commit d1d7a46

Please sign in to comment.