Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().
llvm-svn: 94564
This commit is contained in:
parent
e5402e4749
commit
a0f99ff230
|
@ -1501,8 +1501,8 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) {
|
|||
if (Sect)
|
||||
GV->setSection(Sect);
|
||||
if (isUTF16) {
|
||||
unsigned Align = getContext().getTypeAlign(getContext().ShortTy)/8;
|
||||
GV->setAlignment(Align);
|
||||
CharUnits Align = getContext().getTypeAlignInChars(getContext().ShortTy);
|
||||
GV->setAlignment(Align.getQuantity());
|
||||
}
|
||||
Fields[2] = llvm::ConstantExpr::getGetElementPtr(GV, Zeros, 2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue