[llvm-commits] change to isDefinition for aliases
Chris Lattner
clattner at apple.com
Thu Jul 14 11:16:48 PDT 2011
I'd like to commit the following simple patch to change GlobalValue::isDeclaration() to always return false for aliases:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.patch
Type: application/octet-stream
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110714/f1ee5db3/attachment.obj>
-------------- next part --------------
This is my understanding of how aliases work. Notably "isDeclaration()" doesn't care about linkage (e.g. weak) it just cares about whether the entity is "defined in this module" or not. It doesn't make sense to have an alias in a translation unit that isn't a definition. This will allow some hacks to be removed from the IR linker.
This passes all the regression tests, but I don't have a machine with alias support to test on. Ok?
-Chris
More information about the llvm-commits
mailing list