Class: RLTK::CG::Target
- Includes:
- BindingClass
- Defined in:
- lib/rltk/cg/target.rb
Overview
Class binding for the LLVM Triple class.
Instance Attribute Summary collapse
-
#triple ⇒ Triple
readonly
Triple object for this target.
Attributes included from BindingClass
Class Method Summary collapse
-
.host ⇒ Target
Target object for the host architecture.
Instance Method Summary collapse
-
#initialize(overloaded) ⇒ Target
constructor
Create an object representing a particular code generation target.
Methods included from BindingClass
Constructor Details
#initialize(overloaded) ⇒ Target
Create an object representing a particular code generation target. You can create a target either from a string or a Triple.
36 37 38 39 40 41 42 |
# File 'lib/rltk/cg/target.rb', line 36 def initialize(overloaded) @ptr, @triple = case overloaded when String then [Bindings.get_target_from_string(overloaded), Triple.new(overloaded)] when Triple then [Bindings.get_target_from_triple(overloaded), overloaded] end end |
Instance Attribute Details
#triple ⇒ Triple (readonly)
Returns Triple object for this target.
25 26 27 |
# File 'lib/rltk/cg/target.rb', line 25 def triple @triple end |