makslevental wrote: Alternatively, we could also make @grypp's solution runtime toggleable by adding to the emitted conditonal something like ```python if loc is None and _globals.do_infer_location_info(): loc = get_source_location() ``` https://github.com/llvm/llvm-project/pull/112923