[llvm-commits] [patch] Remember the VariantKind when recursively evaluating a variable

Rafael Espindola espindola at google.com
Fri Oct 15 12:11:22 PDT 2010


The attached patch changes EvaluateAsRelocatable to remember the
VariantKind when recursing on a variable and to produce a new
MCSymbolRefExpr with the correct kind. This fixes relocations on
aliases and allows clang to build itself with -g.

Another option is to just not recurse if the variant kind is not
VK_None. This would match gnu as a bit better, but also requires a
change to  MCAssembler::EvaluateFixup so that it can handle aliases
correctly.

Is it OK?

Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alias-reloc.patch
Type: text/x-patch
Size: 8100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101015/fe300669/attachment.bin>


More information about the llvm-commits mailing list