VMKIT: Error while producing LLVMruntime.inc (using llvm-as and llc)

vmkit fails to build because llvm-as with llc -march=cpp generate wrong code for
AttrListPtr AttrListPtr::get(ArrayRef< AttributeWithIndex >Attrs)
http://llvm.org/doxygen/classllvm_1_1AttrListPtr.html#a3a19622d131e9f0d981398f54cf6acfc

bellow you can see the faulty generated code

llvm-as ./vmkit/lib/vmkit/Compiler/LLVMRuntime.ll -o - | llc -march=cpp -cppgen=contents -o - | grep 'AttrListPtr::get'
  func_llvm_sqrt_f64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_sin_f64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_cos_f64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_memcpy_i32_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_memset_i32_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_frameaddress_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i8_p0i8_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i16_p0i16_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i32_p0i32_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_atomic_cmp_swap_i64_p0i64_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_unconditionalSafePoint_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_conditionalSafePoint_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_llvm_gcroot_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func__setjmp_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_registerSetjmp_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
  func_unregisterSetjmp_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());

One would expect to see AttrListPtr::get(Attrs.begin(), Attrs.end())

Thank you
Foivos

Hi Foivos,

Thank you for reporting the error! I have fixed the problem on svn trunk, so if you update and compile llvm and vmkit again, you should have things compile again.

Nicolas