[llvm-commits] [PATCH] Fix assertion failure in MC

James Molloy james.molloy at arm.com
Fri Jan 27 10:08:59 PST 2012


Hi Rafael,

The testcase in PR11865 is different to my testcase.

The code is throwing an error AsmParser.cpp:1609, but I think really it
should be going down the codepath of :1605:

    if (Sym->isUndefined() && !Sym->isUsed() && !Sym->isVariable())
      ; // Allow redefinitions of undefined symbols only used in directives

It is not, because !Sym->isUsed() is firing false. I think that clause
should be removed.

Anyway, this is a completely different part of the MC to my original bug,
and I think I should just change IsInSection() to parallel what GetSection()
does. Aliases are being initialised in an arbitrary order (not taking
dependencies into account) and it looks rather difficult to change that.

TL;DR: The eager initialisation of the Section attribute may fail for
aliases, so add a lazy fallback.

What do you think?

James

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Rafael Ávila de
Espíndola
Sent: 27 January 2012 03:00
To: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH] Fix assertion failure in MC

Btw, I have reduce this (maybe too much) to the testcase in PR11865. I
will take a look.

Cheers,
Rafael
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits








More information about the llvm-commits mailing list