Manual-sync mirror of chromium.googlesource.com/external/github.com/llvm/llvm-project (bare monorepo, no subtree suffix)
Find a file
Grigory Pastukhov 8c0f3b6e8f
[BOLT] Fix debug line emission for functions in multiple compilation units (#151230)
This patch fixes a bug in BOLT's debug line emission where functions
that belong to multiple compilation units (such as inline functions in
header files) were not handled correctly. Previously, BOLT incorrectly
assumed that a binary function could belong to only one compilation
unit, leading to incomplete or incorrect debug line information.

### **Problem**

When a function appears in multiple compilation units (common scenarios
include):

*   Template instantiated functions
* Inline functions defined in header files included by multiple source
files

BOLT would only emit debug line information for one compilation unit,
losing debug information for other CUs where the function was compiled.
This resulted in incomplete debugging information and could cause
debuggers to fail to set breakpoints or show incorrect source locations.

### **Root Cause**

The issue was in BOLT's assumption that each binary function maps to
exactly one compilation unit. However, when the same function (e.g., an
inline function from a header) is compiled into multiple object files,
it legitimately belongs to multiple CUs in the final binary.
2025-09-11 10:41:11 -07:00
.ci Revert stubgen-related patches (#157831) 2025-09-10 12:35:38 +01:00
.github [LifetimeSafety] Add PR labeler automation (#157820) 2025-09-10 12:00:04 +02:00
bolt [BOLT] Fix debug line emission for functions in multiple compilation units (#151230) 2025-09-11 10:41:11 -07:00
clang [clang] Use VFS for -fopenmp-host-ir-file-path (#156727) 2025-09-11 09:08:47 -07:00
clang-tools-extra [clang-tidy][NFC] Fix typo in comment 2025-09-09 19:07:05 -07:00
cmake [CMake][AIX] Enable CMP0182: Create shared library archives by default (#155686) 2025-08-28 09:29:27 -04:00
compiler-rt [scudo] Add tracing framework (#156112) 2025-09-11 10:23:29 -07:00
cross-project-tests [Dexter] Add -v to lit dexter substitutions (#158025) 2025-09-11 11:25:25 +01:00
flang [RISCV] Make "target-feature +i" explicit (#157835) 2025-09-11 08:49:06 +02:00
flang-rt [flang-rt] Use -Wp to undefine macros (#156034) 2025-09-11 15:47:25 +02:00
libc [libc] Migrate some test/src/time tests to ErrnoCheckingTest. (#157960) 2025-09-10 17:00:02 -07:00
libclc [NFC][libclc] Replace _CLC_V_V_VP_VECTORIZE macro with use of unary_def_with_ptr_scalarize.inc (#157002) 2025-09-09 08:11:27 +08:00
libcxx [libc++] Ensure benchmark comparison output ends with a newline 2025-09-11 12:16:05 -04:00
libcxxabi [NFC][CMake] quote ${CMAKE_SYSTEM_NAME} consistently (#154537) 2025-08-20 12:45:41 -04:00
libsycl [SYCL] Add libsycl, a SYCL RT library implementation project (#144372) 2025-07-31 11:28:39 -07:00
libunwind [libunwind][test] set fed test to require x86 as others arch may have cross toolchain build (#156383) 2025-09-02 19:30:44 +08:00
lld [Support] Rename CTLog2 to ConstantLog2 in MathExtras.h (#158006) 2025-09-11 07:54:27 -07:00
lldb Revert "[lldb][NFC] Force some logging on to TestCortexMExceptionUnwind.py" 2025-09-10 22:58:30 -07:00
llvm [SupportLSP] Fix dependency on Support 2025-09-11 19:40:10 +02:00
llvm-libgcc
mlir [LLVM][MLIR] Move LSP server support library from MLIR into LLVM (#157885) 2025-09-11 17:17:52 +00:00
offload [offload] Fix finding libomptarget in runtimes build (#157856) 2025-09-10 16:31:22 +02:00
openmp [offload][OpenMP] Remove device code for num_threads strict (#157893) 2025-09-11 13:12:29 +00:00
orc-rt [orc-rt] Simplify construction of SPSSerializableExpected from values. (#157796) 2025-09-10 14:56:12 +10:00
polly [polly][CMake] Replace elseif () with else () 2025-08-31 14:53:01 -07:00
runtimes [orc-rt] Remove unused LLVM_RT_TOOLS_BINARY_DIR cmake variable. (#154254) 2025-08-19 19:56:27 +10:00
third-party [NFC][CMake] quote ${CMAKE_SYSTEM_NAME} consistently (#154537) 2025-08-20 12:45:41 -04:00
utils/bazel Fix bazel target broken in #157537 (#157982) 2025-09-10 21:16:52 -05:00
.clang-format
.clang-format-ignore Add empty top level .clang-format-ignore (#136022) 2025-04-16 15:48:30 -07:00
.clang-tidy Format root clang-tidy config (NFC) (#147902) 2025-07-11 07:18:29 +03:00
.git-blame-ignore-revs Revert "Update .git-blame-ignore-revs for Pack/Unpack move (#152469)" (#152661) 2025-08-10 17:02:35 +01:00
.gitattributes
.gitignore [llvm] Ignore coding assistant artifacts (#153853) 2025-08-15 12:27:54 -07:00
.mailmap [mailmap] Update my name 2025-04-14 16:54:14 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md [www][docs] Remove last mentions of IRC (#139076) 2025-05-08 09:40:33 -04:00
LICENSE.TXT
pyproject.toml
README.md
SECURITY.md

The LLVM Compiler Infrastructure

OpenSSF Scorecard OpenSSF Best Practices libc++

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.