aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authoresmeyi <esme.yi@ibm.com>2022-07-03 23:16:16 -0400
committeresmeyi <esme.yi@ibm.com>2022-07-03 23:16:16 -0400
commitd2a35e4d39fec0c328f9bb05ad3ea7134751a64e (patch)
treed2c86f34e4cb32aa4bfb34b3ca49e12fa77c3e1f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parente98e13ac8f385568f30d2ded7ea146a1f2a02d1f (diff)
downloadllvm-d2a35e4d39fec0c328f9bb05ad3ea7134751a64e.zip
llvm-d2a35e4d39fec0c328f9bb05ad3ea7134751a64e.tar.gz
llvm-d2a35e4d39fec0c328f9bb05ad3ea7134751a64e.tar.bz2
[AIX] Handling the label alignment of a global
variable with its multiple aliases. This patch handles the case where a variable has multiple aliases. AIX's assembly directive .set is not usable for the aliasing purpose, and using different labels allows AIX to emulate symbol aliases. If a value is emitted between any two labels, meaning they are not aligned, XCOFF will automatically calculate the offset for them. This patch implements: 1) Emits the label of the alias just before emitting the value of the sub-element that the alias referred to. 2) A set of aliases that refers to the same offset should be aligned. 3) We didn't emit aliasing labels for common and zero-initialized local symbols in PPCAIXAsmPrinter::emitGlobalVariableHelper, but emitted linkage for them in AsmPrinter::emitGlobalAlias, which caused a FAILURE. This patch fixes the bug by blocking emitting linkage for the alias without a label. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D124654
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions