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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to