jkorous-apple wrote: @ziqingluo-90 We want compilation unit id to uniquely identify a compilation within a project build. We've concluded that defining such identifier is a hard problem with clang probably not being the right component in which it should be solved. Our intuition is that build systems/build tools are generally better positioned to assign such ID to each compilation.
`InFile` contains only the path to "the .cpp file" being compiled. That is generally not sufficient to uniquely identify a compilation (a clang invocation during the build). For example, on macOS, there are projects that we'd like to analyze that build universal binaries. During their build, each cpp file is compiled multiple times producing an object file for a different architecture each time. We would get multiple TU summaries with the same compilation unit ID and we would not be able to relate them with the compilations. Another scenarios would be projects that compile the same cpp file multiple times (and link the output together) using different preprocessor configuration for each compilation. https://github.com/llvm/llvm-project/pull/203345 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
