mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Fix an obvious problem with an alignment computation. AsmPrinter actually does
the max itself, so it is not easy to write a test case for this, but I added a test case that would fail if the code in AsmPrinter were removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -621,7 +621,7 @@ unsigned TargetData::getPreferredAlignment(const GlobalVariable *GV) const {
|
||||
if (GVAlignment >= Alignment) {
|
||||
Alignment = GVAlignment;
|
||||
} else if (GVAlignment != 0) {
|
||||
Alignment = std::min(GVAlignment, getABITypeAlignment(ElemType));
|
||||
Alignment = std::max(GVAlignment, getABITypeAlignment(ElemType));
|
||||
}
|
||||
|
||||
if (GV->hasInitializer()) {
|
||||
|
Reference in New Issue
Block a user