Assembling the output of llc

Hello,

get tons of errors - it appears to be choking on lines like the following:

What is the target you're generating code for? Actually, not target
(which seems to be x86), but subtarget? Is it darwin?

Anton Korobeynikov wrote:

Hello,

get tons of errors - it appears to be choking on lines like the following:
    

What is the target you're generating code for? Actually, not target
(which seems to be x86), but subtarget? Is it darwin

Yes exactly. I'm on OS X (x86), and I'm not specifying a target - I assumed that it would choose sensible defaults...

-- Talin

Hello,

get tons of errors - it appears to be choking on lines like the following:

What is the target you're generating code for? Actually, not target
(which seems to be x86), but subtarget? Is it darwin?

non_lazy_ptr is a Darwin thing, yes. Probably this is a misconfiguration.

Hello Talin,

Yes exactly. I'm on OS X (x86), and I'm not specifying a target - I
assumed that it would choose sensible defaults...

Could you please provide a .bc testcase? There can be multiple issues,
but at the first glance it seems, that names were not properly mangled.

Anton Korobeynikov wrote:

Hello Talin,
  

Yes exactly. I'm on OS X (x86), and I'm not specifying a target - I assumed that it would choose sensible defaults...
    

Could you please provide a .bc testcase? There can be multiple issues,
but at the first glance it seems, that names were not properly mangled.
  

I've created bug 2342 – Can't assemble the output of llc and attached my example file to it.

It wouldn't surprise me if it was a problem with the name mangling. According to the docs, LLVM allows punctuation symbols inside of identifiers, and I am taking advantage of this to include the complete type signature of each method in its name, punctuation and all. (One of things I really dislike about C++ is trying to interpret mangled names in a stack trace.) I'm counting on LLVM to be able to quote/escape everything as needed.

-- Talin

It seems the quotes aren't being put in the right places when constructing
"$stub" and "$non_lazy_ptr" names, they should look like this:

"L(complicated<expression>)$non_lazy_ptr"

with the quotes outside. This hasn't come up before because the only places quotes
occur now is in ObjectiveC names which don't use stubs or non-lazy pointers.
I guess it ought to work, though, shouldn't be hard.

Dale Johannesen wrote: