Issue 1:
cc @vtjnash @Keno

It probably caused by 2 separate changes.

One is dadf243 with my comments in it. Second one is some llvm::Triple changes in LLVM_SVN llvm-mirror/llvm@0987211.

Compilation error is below

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<>::CreateConstInBoundsGEP2_32(llvm::Value*&, int, unsigned int&)’
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<preserveNames, T, Inserter>::CreateConstInBoundsGEP2_32(llvm::Type*, llvm::Value*, unsigned int, unsigned int, const llvm::Twine&) [with bool preserveNames = true; T = llvm::ConstantFolder; Inserter = llvm::IRBuilderDefaultInserter<true>]
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&)’
m->setTargetTriple(jl_TargetMachine->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<>’ 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&)’
m->setTargetTriple(jl_TargetMachine->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&)’
engine_module->setTargetTriple(jl_TargetMachine->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

Do we have daily builds against LLVM trunk somewhere? Am I duplicating someone else's work?

Thanks,

Issue 2:
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:

julia> :a => "b" |> typeof
:a => String

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.