ruby-llvm 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib 'LLVM-3.3'
7
+ ffi_lib 'LLVM-3.4'
8
8
 
9
9
  def self.attach_function(name, *_)
10
10
  begin; super; rescue FFI::NotFoundError => e
@@ -4,7 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib 'LLVM-3.3'
7
+ ffi_lib 'LLVM-3.4'
8
8
 
9
9
  def self.attach_function(name, *_)
10
10
  begin; super; rescue FFI::NotFoundError => e
@@ -4,7 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib 'LLVM-3.3'
7
+ ffi_lib 'LLVM-3.4'
8
8
 
9
9
  def self.attach_function(name, *_)
10
10
  begin; super; rescue FFI::NotFoundError => e
@@ -100,6 +100,14 @@ module LLVM::C
100
100
  # @scope class
101
101
  attach_function :add_loop_rotate_pass, :LLVMAddLoopRotatePass, [:pointer], :void
102
102
 
103
+ # See llvm::createLoopRerollPass function.
104
+ #
105
+ # @method add_loop_reroll_pass(pm)
106
+ # @param [FFI::Pointer(PassManagerRef)] pm
107
+ # @return [nil]
108
+ # @scope class
109
+ attach_function :add_loop_reroll_pass, :LLVMAddLoopRerollPass, [:pointer], :void
110
+
103
111
  # See llvm::createLoopUnrollPass function.
104
112
  #
105
113
  # @method add_loop_unroll_pass(pm)
@@ -124,6 +132,14 @@ module LLVM::C
124
132
  # @scope class
125
133
  attach_function :add_mem_cpy_opt_pass, :LLVMAddMemCpyOptPass, [:pointer], :void
126
134
 
135
+ # See llvm::createPartiallyInlineLibCallsPass function.
136
+ #
137
+ # @method add_partially_inline_lib_calls_pass(pm)
138
+ # @param [FFI::Pointer(PassManagerRef)] pm
139
+ # @return [nil]
140
+ # @scope class
141
+ attach_function :add_partially_inline_lib_calls_pass, :LLVMAddPartiallyInlineLibCallsPass, [:pointer], :void
142
+
127
143
  # See llvm::createPromoteMemoryToRegisterPass function.
128
144
  #
129
145
  # @method add_promote_memory_to_register_pass(pm)
@@ -4,7 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib 'LLVM-3.3'
7
+ ffi_lib 'LLVM-3.4'
8
8
 
9
9
  def self.attach_function(name, *_)
10
10
  begin; super; rescue FFI::NotFoundError => e
@@ -1,4 +1,4 @@
1
1
  module LLVM
2
- LLVM_VERSION = "3.3"
3
- RUBY_LLVM_VERSION = "3.3.0"
2
+ LLVM_VERSION = "3.4"
3
+ RUBY_LLVM_VERSION = "3.4.0"
4
4
  end
@@ -37,6 +37,11 @@ class ModuleTestCase < Minitest::Test
37
37
  assert yielded, 'LLVM::Module::GlobalCollection#add takes block'
38
38
  end
39
39
 
40
+ def test_to_s
41
+ mod = LLVM::Module.new('test_print')
42
+ assert_equal mod.to_s, "; ModuleID = 'test_print'\n"
43
+ end
44
+
40
45
  def test_dump
41
46
  mod = LLVM::Module.new('test_print')
42
47
  expected_pattern = /^; ModuleID = 'test_print'$/
@@ -53,18 +58,6 @@ class ModuleTestCase < Minitest::Test
53
58
  $stderr.reopen(stderr_old)
54
59
  end
55
60
  end
56
-
57
- Tempfile.open('test_dump.2') do |tmpfile|
58
- # file descriptor
59
- mod.dump(tmpfile.fileno)
60
- assert_match expected_pattern, File.read(tmpfile.path)
61
- end
62
-
63
- Tempfile.open('test_dump.3') do |tmpfile|
64
- # io object
65
- mod.dump(tmpfile)
66
- assert_match expected_pattern, File.read(tmpfile.path)
67
- end
68
61
  end
69
62
 
70
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-llvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Voorhis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-22 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.0.0
186
+ rubygems_version: 2.0.14
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: LLVM bindings for Ruby