<div dir="ltr">ping?<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">----------<br>Chuck Atkins<br>Staff R&D Engineer, Scientific Computing<br>Kitware, Inc.<br>(518) 881-1183<br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Sep 21, 2016 at 11:21 AM, Chuck Atkins <span dir="ltr"><<a href="mailto:chuck.atkins@kitware.com" target="_blank">chuck.atkins@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">chuckatkins updated this revision to Diff 72047.<br>
chuckatkins added a comment.<br>
<br>
Fix unresolved linker symbols from un-namespaced extern definitions<br>
<br>
When LCSSAID and LoopSimplifyID are declared extern inside a function body,<br>
some linkers will fail to resolve the actual symbols defined in the llvm<br>
namespace.  By removing the function local extern declarations and moving<br>
them to outside the function body, the symbols can be properly resolved.<br>
This is specifically an issue when building with the Intel compiler.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D24670" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D24670</a><br>
<br>
Files:<br>
  lib/Transforms/Utils/<wbr>LoopUtils.cpp<br>
<br>
Index: lib/Transforms/Utils/<wbr>LoopUtils.cpp<br>
==============================<wbr>==============================<wbr>=======<br>
--- lib/Transforms/Utils/<wbr>LoopUtils.cpp<br>
+++ lib/Transforms/Utils/<wbr>LoopUtils.cpp<br>
@@ -929,6 +929,14 @@<br>
   return UsedOutside;<br>
 }<br>
<br>
+// We locally access their IDs for LoopSimplify and LCSSA here because<br>
+// users shouldn't directly get them from this header.<br>
+namespace llvm<br>
+{<br>
+  extern char &LoopSimplifyID;<br>
+  extern char &LCSSAID;<br>
+}<br>
+<br>
 void llvm::getLoopAnalysisUsage(<wbr>AnalysisUsage &AU) {<br>
   // By definition, all loop passes need the LoopInfo analysis and the<br>
   // Dominator tree it depends on. Because they all participate in the loop<br>
@@ -938,10 +946,7 @@<br>
   AU.addRequired<<wbr>LoopInfoWrapperPass>();<br>
   AU.addPreserved<<wbr>LoopInfoWrapperPass>();<br>
<br>
-  // We must also preserve LoopSimplify and LCSSA. We locally access their IDs<br>
-  // here because users shouldn't directly get them from this header.<br>
-  extern char &LoopSimplifyID;<br>
-  extern char &LCSSAID;<br>
+  // We must also preserve LoopSimplify and LCSSA.<br>
   AU.addRequiredID(<wbr>LoopSimplifyID);<br>
   AU.addPreservedID(<wbr>LoopSimplifyID);<br>
   AU.addRequiredID(LCSSAID);<br>
<br>
<br>
</blockquote></div><br></div>