[PATCH] D67649: [FileCheck] Move private interface to its own header

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 05:39:04 PDT 2019


thopre marked an inline comment as done.
thopre added inline comments.


================
Comment at: llvm/include/llvm/Support/FileCheck.h:28
 namespace llvm {
+namespace filecheck {
 
----------------
jhenderson wrote:
> jhenderson wrote:
> > dblaikie wrote:
> > > Does this need a new namespace? We don't really use too many of them in LLVM & if things are moving out of the header, I'd expect this change would only reduce the chance of naming collisions and reduce the need for an extra namespace.
> > I personally would prefer the namespace, as it allows simplifying the naming of the various structs everywhere within the FileCheck code, and therefore making the code more readable. I think I suggested it a while back, but it didn't happen at the time for some reason that I forget.
> For reference, a couple of examples of namespace usage within areas of LLVM I've worked in are `object` (for the Object library) and `objcopy` (for the llvm-objcopy code).
Forgive my naive question but why is a namespace necessary to simplfy the naming of internal types? I feel only type in the public interface would benefit from a namespace but then I'd need to come up with a new name for the FileCheck class to avoid the weird llvm::filecheck::FileCheck type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67649





More information about the llvm-commits mailing list