Debug Info
DebugInfo extracts and normalizes source-level metadata from LLVM IR.
Headers: include/Analysis/DebugInfo/
Implementation: lib/Analysis/DebugInfo/
Overview
This subsystem bridges LLVM debug metadata and Lotus analyses. It is used by bug checkers and reporting code that need stable source locations, loop structure, and metadata-derived identities.
Main components
DebugInfoAnalysisextracts reusable debug information from a module.MetadataManagerutilities provide instruction-, module-, and annotation-level metadata access.LoopStructureandMetadataEntryhelp analyses reason about source structure beyond raw IR.
Typical use cases
Attach file and line information to bug reports.
Recover loop structure or source annotations from LLVM metadata.
Support source-aware post-processing of analysis results.
Reliability considerations
Debug metadata may be incomplete or absent in optimized or stripped bitcode. Clients should therefore retain an IR-level fallback identity and treat a missing file or line as unavailable information, not as an analysis failure. When emitting a report, use the normalized locations from this layer so different checkers present source positions consistently.
See also
See Checker Framework for checker components that rely on this data.