[PATCH] D70544: Debug info: Emit objc_direct methods as members of their containing class
Jonas Devlieghere via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 10:32:23 PST 2019
JDevlieghere accepted this revision.
JDevlieghere added a comment.
LGTM with two minor comments.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4729
- SmallVector<llvm::Metadata *, 16> EltTys;
- auto CurrenetElts = InterfaceDecl->getElements();
- EltTys.append(CurrenetElts.begin(), CurrenetElts.end());
- for (auto &MD : P.second)
- EltTys.push_back(MD);
- llvm::DINodeArray Elements = DBuilder.getOrCreateArray(EltTys);
- DBuilder.replaceArrays(InterfaceDecl, Elements);
- }
+ SmallVector<llvm::Metadata *, 16> EltTys;
+ auto CurrentElts = InterfaceDecl->getElements();
----------------
You could move this down and use the `SmallVector` ctor that takes two iterators. Although it only saves one line I think it better expresses your intent.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4733
+
+ // For DWARF v.4 or earlier, only add objc_direct methods.
+ for (auto &SubprogramDirect : P.second)
----------------
`s/v.4/v4/`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70544/new/
https://reviews.llvm.org/D70544
More information about the cfe-commits
mailing list