Displaying 2 results from an estimated 2 matches for "taxpct".
2015 Oct 05
2
Swift to IR, generates wrong IR
...^
I know swift is not part of the LLVM oss project, but is this problem coming from swift generating wrong IR code or is this a LLVM bug (or maybe I’m just doing something wrong)?
Cheers,
ps: this is the swift code I try running:
class TipCalculator {
// 2
let total: Double
let taxPct: Double
let subtotal: Double
// 3
init(total: Double, taxPct: Double) {a
self.total = total
self.taxPct = taxPct
subtotal = total / (taxPct + 1)
}
// 4
func calcTipWithTipPct(tipPct: Double) -> Double {a
return subtotal * tipPct
}
// 5
fun...
2015 Oct 05
2
Swift to IR, generates wrong IR
...ming from swift generating wrong IR code or is this a LLVM bug (or maybe I’m just doing something wrong)?
>>
>> Cheers,
>>
>> ps: this is the swift code I try running:
>>
>> class TipCalculator {
>>
>> // 2
>> let total: Double
>> let taxPct: Double
>> let subtotal: Double
>>
>> // 3
>> init(total: Double, taxPct: Double) {a
>> self.total = total
>> self.taxPct = taxPct
>> subtotal = total / (taxPct + 1)
>> }
>>
>> // 4
>> func calcTipWit...