Closed mheinsen closed 11 years ago
When we construct a seec::seec_clang::MappedModule, we load compile information from the module. This information includes the path and contents of all source files used. Currently we load this after we create the ASTs, but we can load it beforehand.
If we have loaded it beforehand then when we are creating the ASTs, we can get the used source files and insert them as virtual files:
It seems that if we create the ASTUnit before compiling, we'll be able to access the FileManager and SourceManager to set these things up, and then we can finish loading the ASTUnit.
When opening a SeeC-Clang mapped trace, we currently regenerate ASTs from the source code that is in the original location. If the source code is changed or removed then this will cause problems for us. We saved the source code used during compilation into the trace for this purpose, so use this when building the AST.