[llvm-bugs] [Bug 47773] New: [PCH] contents of header file is fully read with -g despite compiling with pch
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 8 14:28:59 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47773
Bug ID: 47773
Summary: [PCH] contents of header file is fully read with -g
despite compiling with pch
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: Wolfgang_Pieb at playstation.sony.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
Created attachment 24037
--> https://bugs.llvm.org/attachment.cgi?id=24037&action=edit
Test case
With -g the frontend seems to read the contents of a header file in its
entirety even when compiling with pch. This happens as part of the effort to
establish source locations for entities (a type in the attached test case) for
which debug locations are emitted. SourceManager::getPresumedLoc() attempts to
compute line numbers and in the process reads the header file.
The attached test case is for linux and uses the utility inotifywait to
demonstrate the file access (a stat call does not trigger a notification BTW,
only a read).
Set CLANG to a recently built clang and do
make; make all
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201008/2b5f92bd/attachment.html>
More information about the llvm-bugs
mailing list