search for: example_fil

Displaying 4 results from an estimated 4 matches for "example_fil".

Did you mean: example_file
2012 Sep 23
1
ruby koans don't understand the principle sandwhich code
...dgecase'') class AboutSandwichCode < EdgeCase::Koan def count_lines(file_name) file = open(file_name) count = 0 while line = file.gets count += 1 end count ensure file.close if file end def test_counting_lines assert_equal 4, count_lines("example_file.txt") end # ------------------------------------------------------------------ def find_line(file_name) file = open(file_name) while line = file.gets return line if line.match(/e/) end ensure file.close if file end def test_finding_lines assert_equal &...
2013 Jul 24
0
[LLVMdev] Steps to addDestination
...a parameter in a rather bizarre set of circumstances. Do you know about the Cpp backend, by the way? It can be very useful for working out just what you have to write to emit certain LLVM IR. What you do is write your own .ll file by hand, having the features you want, then run $ llc -march=cpp example_file.ll -o - LLVM will produce some C++ code that generates the module you wrote. It's not necessarily in the best of styles, but shows you roughly which calls you should be making. Cheers. Tim.
2013 Jul 23
2
[LLVMdev] Steps to addDestination
1- I need the first example. 2- I set the Address uninitialized according to the documentation " Setting the name on the Value automatically updates the module's symbol table" from Value.h source code 3- I'm not sure about "select" instruction, you mean that the address is the new destination (basic block)that will be added Thanks On 23 July 2013 16:38, Tim Northover
2013 Jul 24
2
[LLVMdev] Steps to addDestination
...Value* Address= BlockAddress::get (*rit); IndirectBrInst *IBI = IndirectBrInst::Create(Address, Result.size(),i->getTerminator() ); IBI->addDestination((*rit)); } I tried this code , but the needed destination wasn't added. 2- About LLVM backend $ llc -march=cpp example_file.ll -o I think it will be so helpful for my work Thanks On 24 July 2013 08:37, Tim Northover <t.p.northover at gmail.com> wrote: > Hi Rasha, > > On Wed, Jul 24, 2013 at 12:28 AM, Rasha Omar <rasha.sala7 at gmail.com> > wrote: > > 1- I need the first example. > &...