[PATCH] D43547: [NameMangling] Make ASTContext owning the ManglingContext during entire compilation

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 21 17:53:46 PST 2018


rnk added a comment.

Can you update the description to clarify that this is fixing a bug in the indexing library? From the description it sounds like we have a serious bug in FUNCDNAME codegen, which is not the case. CodeGen does the right thing. The ASTContext API is just crappy, so the Index library used it incorrectly. The fix is to simplify the ASTContext API so that it owns the mangling context.



================
Comment at: include/clang/AST/ASTContext.h:2160
 
   MangleContext *createMangleContext();
+  MangleContext &getMangleContext();
----------------
Please refactor all the other code that uses `createMangleContext` to use `getMangleContext`, and then make `createMangleContext` private.


Repository:
  rC Clang

https://reviews.llvm.org/D43547





More information about the cfe-commits mailing list