diff options
author | Mike Stump <mrs@apple.com> | 2009-09-22 02:44:17 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-22 02:44:17 +0000 |
commit | fd47b31be0f835ea15dc1f9407940980bb50ddcf (patch) | |
tree | ca3bb94a6d4a3c2a3a85ce0ae44411dbb34bfec0 /lib/CodeGen | |
parent | 196efbf095d75180305a45f3033caa1003746604 (diff) |
Fix some typos. WIP. Large alignments don't work yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 6f5bb15d45..0074316b4c 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1009,9 +1009,9 @@ void CGDebugInfo::EmitDeclare(const VarDecl *Decl, unsigned Tag, unsigned Align = M->getContext().getDeclAlignInBytes(Decl); if (Align > M->getContext().Target.getPointerAlign(0) / 8) { unsigned AlignedOffsetInBytes - = llvm::RoundUpToAlignment(FieldOffset, Align); + = llvm::RoundUpToAlignment(FieldOffset/8, Align); unsigned NumPaddingBytes - = AlignedOffsetInBytes = FieldOffset; + = AlignedOffsetInBytes - FieldOffset/8; if (NumPaddingBytes > 0) { llvm::APInt pad(32, NumPaddingBytes); @@ -1032,7 +1032,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *Decl, unsigned Tag, FType = Type; FieldTy = CGDebugInfo::getOrCreateType(FType, Unit); FieldSize = M->getContext().getTypeSize(FType); - FieldAlign = M->getContext().getTypeAlign(FType); + FieldAlign = Align*8; std::string Name = Decl->getNameAsString(); FieldTy = DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_member, Unit, |