v.g.vassilev added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:908
 
+CodeGenerator *CodeGenAction::getCodeGenerator() const {
+  return BEConsumer->getCodeGenerator();
----------------
@rjmccall, we were wondering if there is a better way to ask CodeGen to start a 
new module. The current approach seems to be drilling hole in a number of 
abstraction layers.

In the past we have touched that area a little in 
https://reviews.llvm.org/D34444 and the answer may be already there but I fail 
to connect the dots.

Recently, we thought about having a new FrontendAction callback for beginning a 
new phase when compiling incremental input. We need to keep track of the 
created objects (needed for error recovery) in our Transaction. We can have a 
map of `Transaction*` to `llvm::Module*` in CodeGen. The issue is that new JITs 
take ownership of the `llvm::Module*` which seems to make it impossible to 
support jitted code removal with that model (cc: @lhames, @rsmith).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96033/new/

https://reviews.llvm.org/D96033

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to