aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorAleksei Vetrov <vetaleha@gmail.com>2024-12-12 16:51:52 +0000
committerGitHub <noreply@github.com>2024-12-12 08:51:52 -0800
commit4a5f82b43be7328d7b7b4cd9912487fd3f284b49 (patch)
tree74dfce47cbc62a5415662caeb1e5d36cd7c9d899 /clang/lib/Basic/SourceManager.cpp
parent8eec301fe3ac5fdcb4de4757806661b99c9e6580 (diff)
downloadllvm-4a5f82b43be7328d7b7b4cd9912487fd3f284b49.zip
llvm-4a5f82b43be7328d7b7b4cd9912487fd3f284b49.tar.gz
llvm-4a5f82b43be7328d7b7b4cd9912487fd3f284b49.tar.bz2
[MC] Fix DWARF file table for files with empty DWARF (#119572)
Update root file in DWARF file/line table as soon as we see the first "#line" directive. This was moved from "enabledGenDwarfForAssembly", which is called right before we emit DWARF information. But if the file is empty or contains expressions that doesn't need DWARF, it is never called, leaving an original root file and not the file in the "#line" directive. Add a test checking for this case. This is reapply of #119229 with the following fix: "MCContext::setMCLineTableRootFile" has the effect of adding ".debug_line" section to the output, even if DWARF generation is disabled. Add a check and a test for this case. Fixes: #119020 Fixes: #119229
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions