lld fails to build on Visual Studio 2013

Hey there,

lld fails to build on Visual Studio 2013 because of ErrorOr<void>.
For example, ErrorOr<void> is used in InputGraph.h as the return type
of InputGraph::reset.
Inside of ErrorOr, there is:
typedef typename remove_reference<T>::type &reference
As T is void, and remove_reference <T>::type results in void, the
typedef expands to:
typedef void & reference, which looks rather invalid.

So the punchline is this:
In Visual Studio 2012, the statement typedef remove_reference
<T>::type & reference; compiled. On 2013, it fails.

Greetings,
Daniel Albuschat

I think I removed all uses of ErrorOr<void>. Can you try updating?

I’m currently using MSVC 2012, but I saw that Alp Toker landed a patch to LLD to make it compile with MSVC 2013, so I believe it’s doable. Update and try again.

I updated the llvm top level directory, but forgot to update tools/lld explicitly. After an update, eveything worked fine and sorry for the noise. ;-)Thanks Rui and Rafael.

Daniel