impc:ir:check-type-size-calculations   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmir.xtm

Implementation

;; handy for checking that the type size calculations are getting done
;; correctly.  typename-list should be a list of typenames (as strings)
(define impc:ir:check-type-size-calculations
  (lambda (typename-list)
    (for-each (lambda (type)
                (if (<> (impc:ir:get-type-size type)
                        (llvm:get-named-struct-size type))
                    (println
                     'type: type
                     'impc: (impc:ir:get-type-size type)
                     'llvm: (llvm:get-named-struct-size type))))
              typename-list)
    #t))


Back to Index