Page MenuHomePhabricator

Verify that clang's max alignment is <= LLVM's max alignment
ClosedPublic

Authored by davezarzycki on Fri, Jan 24, 8:59 AM.

Diff Detail

Event Timeline

davezarzycki created this revision.Fri, Jan 24, 8:59 AM
lebedev.ri accepted this revision.Fri, Jan 24, 9:15 AM

SGTM, thank you.

This revision is now accepted and ready to land.Fri, Jan 24, 9:15 AM
This revision was automatically updated to reflect the committed changes.
rnk added a subscriber: rnk.Thu, Jan 30, 1:32 PM
rnk added inline comments.
clang/lib/CodeGen/CGValue.h
18

This includes Sema.h into every codegen file that uses CGValue.h (most of them). That seems bad for build time. :(

This also seems like a layering violation. CodeGen has no dependency on Sema:
https://github.com/llvm/llvm-project/blob/master/clang/lib/CodeGen/CMakeLists.txt#L104

rnk added a comment.Thu, Jan 30, 1:39 PM

I moved this include in rG01943a59f51d8b5ede062305941c1f864b8a6a13. I meant to paste this in the message, but I'll put it here, since the results were significant:

$ diff -u deps-before.txt deps-after.txt |  grep '^[-+] ' |  sort | uniq -c | sort -nr
     50 -    ../clang/include/clang/Sema/Weak.h
     50 -    ../clang/include/clang/Sema/TypoCorrection.h
     50 -    ../clang/include/clang/Sema/SemaConcept.h
     50 -    ../clang/include/clang/Sema/Sema.h
     50 -    ../clang/include/clang/Sema/Scope.h
     50 -    ../clang/include/clang/Sema/ObjCMethodList.h
     50 -    ../clang/include/clang/Sema/IdentifierResolver.h
     50 -    ../clang/include/clang/Sema/ExternalSemaSource.h
     50 -    ../clang/include/clang/Sema/CleanupInfo.h
     50 -    ../clang/include/clang/Sema/AnalysisBasedWarnings.h
     50 -    ../clang/include/clang/Basic/TemplateKinds.h
     50 -    ../clang/include/clang/AST/MangleNumberingContext.h
     50 -    ../clang/include/clang/AST/LocInfoType.h
     50 -    ../clang/include/clang/AST/Availability.h
     49 -    tools/clang/include/clang/Basic/AttrSubMatchRulesList.inc
     49 -    ../llvm/include/llvm/ADT/SmallBitVector.h
     49 -    ../clang/include/clang/Sema/ParsedAttr.h
     49 -    ../clang/include/clang/Sema/Ownership.h
     49 -    ../clang/include/clang/Sema/DeclSpec.h
     49 -    ../clang/include/clang/Basic/BitmaskEnum.h
     49 -    ../clang/include/clang/Basic/AttrSubjectMatchRules.h
     49 -    ../clang/include/clang/AST/NSAPI.h
     47 -    ../clang/include/clang/Lex/Token.h
     36 -    ../clang/include/clang/AST/ExprConcepts.h
     31 -    ../clang/include/clang/AST/StmtCXX.h
     21 -    tools/clang/include/clang/AST/Attrs.inc
     21 -    ../clang/include/clang/AST/Attr.h
     20 -    tools/clang/include/clang/Sema/AttrParsedAttrList.inc
     20 -    ../clang/include/clang/Basic/AttributeCommonInfo.h
      7 -    ../clang/include/clang/Basic/ExpressionTraits.h
      7 -    ../clang/include/clang/AST/ExprObjC.h
      7 -    ../clang/include/clang/AST/ExprCXX.h
      7 -    ../clang/include/clang/AST/DeclTemplate.h
      7 -    ../clang/include/clang/AST/ASTConcept.h