<div dir="ltr">Thanks for fixing this, Rui. I find it odd because I test my patches in a MSVC 2013 box and I didn't get an error and I didn't receive any complaints from buildbots.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 10:10 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Mon Mar 16 20:10:12 2015<br>
New Revision: 232448<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=232448&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=232448&view=rev</a><br>
Log:<br>
Make it compile with MSVC 2013.<br>
<br>
MSVC 2013 cannot compile this code because of C1001 "internal error".<br>
Stop using initializer list without type name.<br>
<br>
Modified:<br>
    lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=232448&r1=232447&r2=232448&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=232448&r1=232447&r2=232448&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Mon Mar 16 20:10:12 2015<br>
@@ -435,11 +435,12 @@ DefaultLayout<ELFT>::getOutputSectionNam<br>
                                           StringRef memberPath,<br>
                                           StringRef inputSectionName) const {<br>
   StringRef outputSectionName;<br>
-  if (_linkerScriptSema.hasLayoutCommands() &&<br>
-      !(outputSectionName = _linkerScriptSema.getOutputSection(<br>
-           {archivePath, memberPath, inputSectionName})).empty())<br>
-    return outputSectionName;<br>
-<br>
+  if (_linkerScriptSema.hasLayoutCommands()) {<br>
+    script::Sema::SectionKey key = {archivePath, memberPath, inputSectionName};<br>
+    outputSectionName = _linkerScriptSema.getOutputSection(key);<br>
+    if (!outputSectionName.empty())<br>
+      return outputSectionName;<br>
+  }<br>
   return llvm::StringSwitch<StringRef>(inputSectionName)<br>
       .StartsWith(".text", ".text")<br>
       .StartsWith(".ctors", ".ctors")<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>