Is the online demo using outdated binaries?

Throwing this C++ code at the online demo:

struct S {
  double d;
  unsigned u;
};

S foo() {
  return S();
}

produces this LLVM C++ API code:

(...)
  PAListPtr func__Z3foov_PAL = 0;
  {
    SmallVector<ParamAttrsWithIndex, 4> Attrs;
    ParamAttrsWithIndex PAWI;
    PAWI.index = 0; PAWI.attrs = 0 | ParamAttr::NoUnwind;
    Attrs.push_back(PAWI);
    PAWI.index = 1; PAWI.attrs = 0 | ParamAttr::StructRet | ParamAttr::NoAlias;
    Attrs.push_back(PAWI);
    func__Z3foov_PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
    
  }
  func__Z3foov->setParamAttrs(func__Z3foov_PAL);
(...)

Please note that it uses index 1 for the return attributes, which is
inconsistent with what ReleaseNotes.html TOT says:

...
* Return value attributes are stored at index 0. Function attributes are
stored at index ~0U. Parameter attributes are stored at index that
matches parameter number.
...

Apart from this, the online demo page mentions llvm2cpp, which does not
exists since 2.3:

Output from llvm2cpp
// Generated by llvm2cpp - DO NOT MODIFY!

No. The demo is using 2.3. I update it personally after every release.

Yes, it incorrectly says llvm2cpp, but its really using llc. I'll change this when I update it.

The ReleaseNotes in TOT are for 2.4.

-Tanya

Tanya Lattner <tonic@nondot.org> writes:

No. The demo is using 2.3. I update it personally after every release.

Okay. I suggest adding a prominent notice about the LLVM version used on
that page, as some other pieces on llvm.org refer to svn head (doxygen
docs, for instance).

Yes, it incorrectly says llvm2cpp, but its really using llc. I'll
change this when I update it.

Thanks!