<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vtjnash/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vtjnash">@vtjnash</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Keno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Keno">@Keno</a><br>
It probably caused by 2 separate changes.<br>
One is <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/dadf2439ee464378a4562e13bc8017859838bf4e/hovercard" href="https://github.com/JuliaLang/julia/commit/dadf2439ee464378a4562e13bc8017859838bf4e"><tt>dadf243</tt></a> with my comments in it. Second one is some llvm::Triple changes in LLVM_SVN <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/llvm-mirror/llvm/commit/0987211e249b0db750475f9f8054853294f04bce/hovercard" href="https://github.com/llvm-mirror/llvm/commit/0987211e249b0db750475f9f8054853294f04bce">llvm-mirror/llvm@<tt>0987211</tt></a>.<br>
Compilation error is below</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    CC src/codegen.dbg.obj
In file included from codegen.cpp:632:0:
cgutils.cpp: In function ‘llvm::Value* emit_getfield_knownidx(llvm::Value*, unsigned int, jl_datatype_t*, jl_codectx_t*)’:
cgutils.cpp:1400:71: error: no matching function for call to ‘llvm::IRBuilder&lt;&gt;::CreateConstInBoundsGEP2_32(llvm::Value*&amp;, int, unsigned int&amp;)’
         Value *addr = builder.CreateConstInBoundsGEP2_32(strct, 0, idx);
                                                                       ^
cgutils.cpp:1400:71: note: candidate is:
In file included from codegen.cpp:63:0:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/IRBuilder.h:1133:10: note: llvm::Value* llvm::IRBuilder&lt;preserveNames, T, Inserter&gt;::CreateConstInBoundsGEP2_32(llvm::Type*, llvm::Value*, unsigned int, unsigned int, const llvm::Twine&amp;) [with bool preserveNames = true; T = llvm::ConstantFolder; Inserter = llvm::IRBuilderDefaultInserter&lt;true&gt;]
   Value *CreateConstInBoundsGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0,
          ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/IRBuilder.h:1133:10: note:   candidate expects 5 arguments, 3 provided
codegen.cpp: In function ‘void jl_setup_module(llvm::Module*, bool)’:
codegen.cpp:726:63: error: no matching function for call to ‘llvm::Module::setTargetTriple(const llvm::Triple&amp;)’
         m-&gt;setTargetTriple(jl_TargetMachine-&gt;getTargetTriple());
                                                               ^
codegen.cpp:726:63: note: candidate is:
In file included from /builddir/build/BUILD/julia-test/usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22:0,
                 from codegen.cpp:20:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note: void llvm::Module::setTargetTriple(llvm::StringRef)
   void setTargetTriple(StringRef T) { TargetTriple = T; }
        ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note:   no known conversion for argument 1 from ‘const llvm::Triple’ to ‘llvm::StringRef’
codegen.cpp: In function ‘llvm::Value* emit_f_is(jl_value_t*, jl_value_t*, jl_value_t*, jl_value_t*, llvm::Value*, llvm::Value*, jl_codectx_t*)’:
codegen.cpp:1968:34: error: ‘class llvm::IRBuilder&lt;&gt;’ has no member named ‘CreateCall3’
                 answer = builder.CreateCall3(memcmp_func,
                                  ^
codegen.cpp: In function ‘void jl_init_codegen()’:
codegen.cpp:5824:59: error: no matching function for call to ‘llvm::Module::setTargetTriple(const llvm::Triple&amp;)’
     m-&gt;setTargetTriple(jl_TargetMachine-&gt;getTargetTriple());
                                                           ^
codegen.cpp:5824:59: note: candidate is:
In file included from /builddir/build/BUILD/julia-test/usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22:0,
                 from codegen.cpp:20:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note: void llvm::Module::setTargetTriple(llvm::StringRef)
   void setTargetTriple(StringRef T) { TargetTriple = T; }
        ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note:   no known conversion for argument 1 from ‘const llvm::Triple’ to ‘llvm::StringRef’
codegen.cpp:5825:71: error: no matching function for call to ‘llvm::Module::setTargetTriple(const llvm::Triple&amp;)’
     engine_module-&gt;setTargetTriple(jl_TargetMachine-&gt;getTargetTriple());
                                                                       ^
codegen.cpp:5825:71: note: candidate is:
In file included from /builddir/build/BUILD/julia-test/usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22:0,
                 from codegen.cpp:20:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note: void llvm::Module::setTargetTriple(llvm::StringRef)
   void setTargetTriple(StringRef T) { TargetTriple = T; }
        ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note:   no known conversion for argument 1 from ‘const llvm::Triple’ to ‘llvm::StringRef’
make[1]: *** [codegen.dbg.obj] Error 1
make: *** [julia-src-debug] Error 2"><pre class="notranslate"><code class="notranslate">    CC src/codegen.dbg.obj
In file included from codegen.cpp:632:0:
cgutils.cpp: In function ‘llvm::Value* emit_getfield_knownidx(llvm::Value*, unsigned int, jl_datatype_t*, jl_codectx_t*)’:
cgutils.cpp:1400:71: error: no matching function for call to ‘llvm::IRBuilder&lt;&gt;::CreateConstInBoundsGEP2_32(llvm::Value*&amp;, int, unsigned int&amp;)’
         Value *addr = builder.CreateConstInBoundsGEP2_32(strct, 0, idx);
                                                                       ^
cgutils.cpp:1400:71: note: candidate is:
In file included from codegen.cpp:63:0:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/IRBuilder.h:1133:10: note: llvm::Value* llvm::IRBuilder&lt;preserveNames, T, Inserter&gt;::CreateConstInBoundsGEP2_32(llvm::Type*, llvm::Value*, unsigned int, unsigned int, const llvm::Twine&amp;) [with bool preserveNames = true; T = llvm::ConstantFolder; Inserter = llvm::IRBuilderDefaultInserter&lt;true&gt;]
   Value *CreateConstInBoundsGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0,
          ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/IRBuilder.h:1133:10: note:   candidate expects 5 arguments, 3 provided
codegen.cpp: In function ‘void jl_setup_module(llvm::Module*, bool)’:
codegen.cpp:726:63: error: no matching function for call to ‘llvm::Module::setTargetTriple(const llvm::Triple&amp;)’
         m-&gt;setTargetTriple(jl_TargetMachine-&gt;getTargetTriple());
                                                               ^
codegen.cpp:726:63: note: candidate is:
In file included from /builddir/build/BUILD/julia-test/usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22:0,
                 from codegen.cpp:20:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note: void llvm::Module::setTargetTriple(llvm::StringRef)
   void setTargetTriple(StringRef T) { TargetTriple = T; }
        ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note:   no known conversion for argument 1 from ‘const llvm::Triple’ to ‘llvm::StringRef’
codegen.cpp: In function ‘llvm::Value* emit_f_is(jl_value_t*, jl_value_t*, jl_value_t*, jl_value_t*, llvm::Value*, llvm::Value*, jl_codectx_t*)’:
codegen.cpp:1968:34: error: ‘class llvm::IRBuilder&lt;&gt;’ has no member named ‘CreateCall3’
                 answer = builder.CreateCall3(memcmp_func,
                                  ^
codegen.cpp: In function ‘void jl_init_codegen()’:
codegen.cpp:5824:59: error: no matching function for call to ‘llvm::Module::setTargetTriple(const llvm::Triple&amp;)’
     m-&gt;setTargetTriple(jl_TargetMachine-&gt;getTargetTriple());
                                                           ^
codegen.cpp:5824:59: note: candidate is:
In file included from /builddir/build/BUILD/julia-test/usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22:0,
                 from codegen.cpp:20:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note: void llvm::Module::setTargetTriple(llvm::StringRef)
   void setTargetTriple(StringRef T) { TargetTriple = T; }
        ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note:   no known conversion for argument 1 from ‘const llvm::Triple’ to ‘llvm::StringRef’
codegen.cpp:5825:71: error: no matching function for call to ‘llvm::Module::setTargetTriple(const llvm::Triple&amp;)’
     engine_module-&gt;setTargetTriple(jl_TargetMachine-&gt;getTargetTriple());
                                                                       ^
codegen.cpp:5825:71: note: candidate is:
In file included from /builddir/build/BUILD/julia-test/usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22:0,
                 from codegen.cpp:20:
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note: void llvm::Module::setTargetTriple(llvm::StringRef)
   void setTargetTriple(StringRef T) { TargetTriple = T; }
        ^
/builddir/build/BUILD/julia-test/usr/include/llvm/IR/Module.h:294:8: note:   no known conversion for argument 1 from ‘const llvm::Triple’ to ‘llvm::StringRef’
make[1]: *** [codegen.dbg.obj] Error 1
make: *** [julia-src-debug] Error 2
</code></pre></div>
<p dir="auto">Do we have daily builds against LLVM trunk somewhere? Am I duplicating someone else's work?</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Per the discussion in Slack, the current behaviour in the following snippet does not confirm to most user's expectations, which can cause issues in some mainstream packages like DataFrames:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; :a =&gt; &quot;b&quot; |&gt; typeof
:a =&gt; String"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">:a</span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds">"</span>b<span class="pl-pds">"</span></span> <span class="pl-k">|&gt;</span> typeof
<span class="pl-c1">:a</span> <span class="pl-k">=&gt;</span> String</pre></div>
<p dir="auto">Following the suggestion in the thread, I'm opening this issue to propose that in v2 the compiler priorities the creation of the Pair data structure.</p>