irTLSModelFromThreadLocal returns the IR TLS model corresponding to the given AST thread local storage.
(old ast.ThreadLocal)
| 702 | // irTLSModelFromThreadLocal returns the IR TLS model corresponding to the given |
| 703 | // AST thread local storage. |
| 704 | func irTLSModelFromThreadLocal(old ast.ThreadLocal) enum.TLSModel { |
| 705 | if n, ok := old.Model(); ok { |
| 706 | // e.g. thread_local(initialexec) |
| 707 | return asmenum.TLSModelFromString(n.Text()) |
| 708 | } |
| 709 | // If no explicit model is given, the "general dynamic" model is used. |
| 710 | // thread_local |
| 711 | return enum.TLSModelGeneric |
| 712 | } |
| 713 | |
| 714 | // irUnwindTarget returns the IR unwind target corresponding to the given AST |
| 715 | // unwind target. |