[llvm-commits] [llvm] r95266 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp test/Transforms/InstCombine/objsize.ll
Duncan Sands
baldrick at free.fr
Thu Feb 4 01:35:28 PST 2010
Hi Eric,
> If we're dealing with a zero-length array, don't lower to any
> particular size, we just don't know what the length is yet.
...
> + at window = external global [0 x i8]
I think this is wrong - the problem isn't due to a zero length array, it's
due to the global being a declaration rather than a definition (i.e. not having
an initializer). The type of a declaration doesn't tell you anything about the
size of the actual object (which is defined in some other object file). For
example, suppose this was:
@window = external global i32
and then in some other file you have the definition:
@window = global i8 0
This is perfectly legal, and shows that trying to determine the "object size"
based only on a declaration is hopeless.
Ciao,
Duncan.
More information about the llvm-commits
mailing list