[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGae869d448499: [LLDB] Remove cases of using namespace llvm:: from header file (authored by shafik). Herald added a project: LLDB. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-03 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik updated this revision to Diff 412751. shafik marked 6 inline comments as done. shafik added a comment. Moved to `using namespace lldb_private::dwarf` everywhere since the consensus is that being verbose is preferred. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120836/new/ http

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-03 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp:19 using namespace lldb; +using namespace dwarf; JDevlieghere wrote: > shafik wrote: > > JDevlieghere wrote: > > > Wouldn't it be more consistent to use `lldb_pr

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp:19 using namespace lldb; +using namespace dwarf; shafik wrote: > JDevlieghere wrote: > > Wouldn't it be more consistent to use `lldb_private::dwarf` everyw

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:46 using namespace lldb_private; +using namespace llvm::dwarf; JDevlieghere wrote: > Why not `lldb_private::dwarf`? I think I started out with this file and must have written

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:35 +using namespace dwarf; using namespace std; extern int g_verbose; [[ https://llvm.org/docs/CodingStandards.html#do-not-use-using-namespace-std | Oh

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Expression/DWARFExpression.cpp:46 using namespace lldb_private; +using namespace llvm::dwarf; Why not `lldb_private::dwarf`? Comment at: lldb/source/Plugins/SymbolFile/DWARF/AppleD

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik updated this revision to Diff 412548. shafik added a comment. Updating diff based on comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120836/new/ https://reviews.llvm.org/D120836 Files: lldb/include/lldb/Core/dwarf.h lldb/include/lldb/Symbol/DWARFCallFrameInfo.h lldb

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D120836#3355245 , @shafik wrote: > In D120836#3355167 , @labath wrote: > >> I think it's reasonable to be able to refer to the dwarf constants from >> within the dwarf plugin via their

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. In D120836#3355167 , @labath wrote: > I think it's reasonable to be able to refer to the dwarf constants from > within the dwarf plugin via their base names alone. The implementation -- a > top-level `using namespace llvm::dwarf`

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Thorsten via Phabricator via lldb-commits
tschuett added a comment. I found this: https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120836/new/ https://reviews.llvm.org/D120836

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I think it's reasonable to be able to refer to the dwarf constants from within the dwarf plugin via their base names alone. The implementation -- a top-level `using namespace llvm::dwarf` -- is not reasonable, but that's because the plugin is very old, and completely unn

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. sorry Shafik I see that you've asked that very question. I'll give a +1 to making use of `using namespace` within .cpp files, especially where a namespace is used pervasively. When a file uses it only a namespace infrequently, I think explicit is reasonable. CHANG

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. For the .cpp files with hundreds of lines modified, what do you think about adding `using namespace llvm::dwarf;` to those? For starters `DWARFExpression.cpp`, `DWARFAbbreviationDeclaration.cpp`, and `SymbolFileDWARF.cpp`. CHANGES SINCE LAST ACTION https://revie

[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

2022-03-02 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. I used `using namespace` in a few functions but I am not committed to this approach. So I am happy to hear feedback on whether we want to just use fully qualified names everywhere instead or nail down a criteria as to when it is acceptable. We also have `using namespace