<div dir="ltr">Really belated ping - just noticed namespaces still have decl line/file. Is this still worth doing at some point?</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 28, 2015 at 4:37 PM Duncan P. N. Exon Smith via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
> On 2015-Oct-28, at 15:15, Adrian Prantl <<a href="mailto:aprantl@apple.com" class="gmail_msg" target="_blank">aprantl@apple.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> aprantl created this revision.<br class="gmail_msg">
> aprantl added reviewers: dexonsmith, echristo, dblaikie.<br class="gmail_msg">
> aprantl added a subscriber: llvm-commits.<br class="gmail_msg">
> aprantl set the repository for this revision to rL LLVM.<br class="gmail_msg">
><br class="gmail_msg">
> The file/line on DINamespace only serves one purpose and that is to prevent anonymous namespaces from different CUs from accidentally being uniqued. Since (C++) namespaces can be opened and closed in many different places, it makes no sense to put an arbitrary decl_file/decl_line on them and having it there prevents ODR type uniquing [example 1].<br class="gmail_msg">
><br class="gmail_msg">
> This patch gets rid of the line number field in DINamespace. The file is still inherited from DIScope. CFE only attaches a DIFile when the namespace is anonymous. A more radical approach would be to drop the DIFile, too, and make anonymous namespaces distinct. I'll reserve this as the next incremental step.<br class="gmail_msg">
><br class="gmail_msg">
> [1] <a href="https://web.archive.org/web/20140725222822/http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073801.html" rel="noreferrer" class="gmail_msg" target="_blank">https://web.archive.org/web/20140725222822/http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073801.html</a><br class="gmail_msg">
><br class="gmail_msg">
> Repository:<br class="gmail_msg">
>  rL LLVM<br class="gmail_msg">
><br class="gmail_msg">
> <a href="http://reviews.llvm.org/D14161" rel="noreferrer" class="gmail_msg" target="_blank">http://reviews.llvm.org/D14161</a><br class="gmail_msg">
><br class="gmail_msg">
> Files:<br class="gmail_msg">
>  include/llvm/IR/DIBuilder.h<br class="gmail_msg">
>  include/llvm/IR/DebugInfoMetadata.h<br class="gmail_msg">
>  lib/AsmParser/LLParser.cpp<br class="gmail_msg">
>  lib/Bitcode/Reader/BitcodeReader.cpp<br class="gmail_msg">
>  lib/Bitcode/Writer/BitcodeWriter.cpp<br class="gmail_msg">
>  lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="gmail_msg">
>  lib/CodeGen/AsmPrinter/DwarfUnit.h<br class="gmail_msg">
>  lib/CodeGen/CGDebugInfo.cpp<br class="gmail_msg">
>  lib/IR/AsmWriter.cpp<br class="gmail_msg">
>  lib/IR/DIBuilder.cpp<br class="gmail_msg">
>  lib/IR/DebugInfoMetadata.cpp<br class="gmail_msg">
>  lib/IR/LLVMContextImpl.h<br class="gmail_msg">
>  test/Assembler/dinamespace.ll<br class="gmail_msg">
>  test/CodeGenCXX/debug-info-namespace.cpp<br class="gmail_msg">
>  test/DebugInfo/Generic/namespace.ll<br class="gmail_msg">
>  test/DebugInfo/X86/dwarf-public-names.ll<br class="gmail_msg">
>  test/Modules/ExtDebugInfo.cpp<br class="gmail_msg">
>  unittests/IR/MetadataTest.cpp<br class="gmail_msg">
><br class="gmail_msg">
> <D14161.38690.patch><br class="gmail_msg">
<br class="gmail_msg">
I notice you missed updating LangRef.<br class="gmail_msg">
<br class="gmail_msg">
I haven't had a chance to look in detail at the rest of the IR changes.  I'll<br class="gmail_msg">
try to look in the next few days.<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div>