"""Bitcode symbols only exist before LTO runs, and only serve the purpose of
resolving visibility so LTO can better optimize. Running LTO creates ObjFiles
from BitcodeFiles, and those ObjFiles contain regular Defined symbols (with
isec set and all) that will replace the bitcode symbols. So things should
(hopefully) work as-is :)"""
-- https://reviews.llvm.org/rGdbbc8d8333f29cf4ad6f4793da1adf71bbfdac69#inline-6081
// Add explicit "has no unwind info" entries for all global and local symbols
// without unwind info.
auto markNoUnwindInfo = [&cuVector, &hasUnwindInfo](const Defined *d) {
- // FIXME: The d->isec null check might be incorrect for symbols
- // from LTO files.
if (d->isLive() && d->isec && isCodeSection(d->isec)) {
Ptr ptr = d->getVA();
if (!hasUnwindInfo.count(ptr))