[PATCH] D32648: Remove line and file from DINamespace

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 15:28:06 PDT 2017


> On Apr 28, 2017, at 3:21 PM, David Blaikie via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> dblaikie accepted this revision.
> dblaikie added inline comments.
> This revision is now accepted and ready to land.
> 
> 
> ================
> Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:379
> void DwarfUnit::addSourceLine(DIE &Die, const DINamespace *NS) {
> -  addSourceLine(Die, NS->getLine(), NS->getFilename(), NS->getDirectory());
> +  addSourceLine(Die, 0, NS->getFilename(), NS->getDirectory());
> }
> ----------------

good catch, I should be able to delete this entire function.

> no need to pass the filename down here either? (why does DINamespace still have a 'getFilename'? (I'm assuming the reason the line isn't passed down is because DINamespace doesn't have getLine anymore?))
> 
> Yeah, I see DIScope still has getFilename - one day might be nice to refactor out some of this if not all scopes have/need this information.

Yes, that's it.
> 
> 
> ================
> Comment at: lib/IR/DebugInfoMetadata.cpp:513
> +  DEFINE_GETIMPL_LOOKUP(DINamespace, (Scope, Name, ExportSymbols));
> +  Metadata *Ops[] = {nullptr, Scope, Name};
> +  DEFINE_GETIMPL_STORE(DINamespace, (ExportSymbols), Ops);
> ----------------
> What's the first null parameter here represent/for?
> 

The Filename that DIScope expects. I'll add a comment explaining this.

thanks!
adrian

> 
> https://reviews.llvm.org/D32648
> 
> 
> 



More information about the llvm-commits mailing list