mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
This adds just the debug info metadata for Compilation Units (the top level container of debug info) - but without anything in them, LLVM won't emit them at all, so while this is testable at the IR level, it isn't observable at the object level until more debug info is added. A couple of starting points in this patch: * A flag (`--debug-info`, seems to match the naming/style of other flags in the carbon driver, though this is different from the naming conventions of clang/gcc) that enables debug info when lowering. Open to other names/approaches (on by default? historically debug info's been to large/expensive to do this, so sticking with that precedent for now). * Enabling that flag by default in the lowering tests - I do find the churn on golden tests a bit rough, and adding more features to all the tests means more churn, but it seems consistent with the approach so far - keep an eye on this and perhaps revisit this if the churn gets too annoying --------- Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com> Co-authored-by: Jon Ross-Perkins <jperkins@google.com>