labath added a comment. In D133906#3792666 <https://reviews.llvm.org/D133906#3792666>, @JDevlieghere wrote:
> In D133906#3792230 <https://reviews.llvm.org/D133906#3792230>, @labath wrote: > >> // no .def file >> #define LLDB_FORWARD_CLASS(cls) \ >> namespace lldb_private { class cls; } \ >> namespace lldb { using cls##SP = std::shared_ptr<lldb_private::cls>; } \ >> ... >> >> LLDB_FORWARD_CLASS(Foo) >> LLDB_FORWARD_CLASS(Bar) >> ... > > Works for me, but I don't see how that would help with go-to definition. > Xcode still won't show you the macro expansion so there's nothing to click > through, which was Jim's complaint. Right, I see. I misunderstood the problem somehow. That said, I can imagine Xcode offering a (clickable) tooltip showin the macro expansion in this case. I know of an IDE that does that, and it's pretty cool. In D133906#3793505 <https://reviews.llvm.org/D133906#3793505>, @clayborg wrote: > Wouldn't this also slow down compilation a bit? Each file that #include > "lldb-forward.h" will not do a large amount of preprocessor stuff for each > and every file that is compiled that includes this? Technically yes, but I very much doubt the difference will be measurable. The slowness of compiling c++ comes from instantiating templates and other fancy stuff. The preprocessor step is ridiculously fast. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133906/new/ https://reviews.llvm.org/D133906 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits