[PING] New SystemZ backend: clang changes

John McCall rjmccall at apple.com
Mon May 6 01:04:42 PDT 2013

On Apr 24, 2013, at 5:12 AM, Richard Sandiford <rsandifo at linux.vnet.ibm.com> wrote:
> Ping for the clang SystemZ port that Uli posted here:
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-April/061170.html
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130408/077970.html
> I've refreshed it against a more recent baseline:
> http://llvm-reviews.chandlerc.com/D718

+unsigned ASTContext::getGlobalAlign(QualType T) const {
+  unsigned Alignment = getTypeAlignInChars(T).getQuantity();
+  unsigned Base = getTargetInfo().getMinGlobalAlign() / getCharWidth();
+  return std::max(Alignment, Base);

This should a CharUnits, not an unsigned.  Also, please name this something
more self-documenting, like getAlignOfGlobalVar.

+  // Don't enforce getGlobalAlign, since the only use of the string
+  // is via this class initializer.

I would say "Don't enforce the target's minimum global alignment ...".

Otherwise this looks fine.


More information about the cfe-commits mailing list