diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-10-20 14:27:22 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-10-20 14:27:22 +0000 |
commit | c3f89253ae359c6a6a043da564892399cf058f01 (patch) | |
tree | fa0b37b47264282bca722dda4cd297427875721b /clang/lib/AST/Stmt.cpp | |
parent | e9f132d3f42b89cf5f4442d207a1b8bef6703af5 (diff) | |
download | bcm5719-llvm-c3f89253ae359c6a6a043da564892399cf058f01.tar.gz bcm5719-llvm-c3f89253ae359c6a6a043da564892399cf058f01.zip |
Retire llvm::alignOf in favor of C++11 alignof.
No functionality change intended.
llvm-svn: 284730
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 194e07724d3..89fbdf9d589 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -315,7 +315,7 @@ AttributedStmt *AttributedStmt::Create(const ASTContext &C, SourceLocation Loc, Stmt *SubStmt) { assert(!Attrs.empty() && "Attrs should not be empty"); void *Mem = C.Allocate(sizeof(AttributedStmt) + sizeof(Attr *) * Attrs.size(), - llvm::alignOf<AttributedStmt>()); + alignof(AttributedStmt)); return new (Mem) AttributedStmt(Loc, Attrs, SubStmt); } @@ -323,7 +323,7 @@ AttributedStmt *AttributedStmt::CreateEmpty(const ASTContext &C, unsigned NumAttrs) { assert(NumAttrs > 0 && "NumAttrs should be greater than zero"); void *Mem = C.Allocate(sizeof(AttributedStmt) + sizeof(Attr *) * NumAttrs, - llvm::alignOf<AttributedStmt>()); + alignof(AttributedStmt)); return new (Mem) AttributedStmt(EmptyShell(), NumAttrs); } @@ -1002,7 +1002,7 @@ CapturedStmt::Capture *CapturedStmt::getStoredCaptures() const { unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (NumCaptures + 1); // Offset of the first Capture object. - unsigned FirstCaptureOffset = llvm::alignTo(Size, llvm::alignOf<Capture>()); + unsigned FirstCaptureOffset = llvm::alignTo(Size, alignof(Capture)); return reinterpret_cast<Capture *>( reinterpret_cast<char *>(const_cast<CapturedStmt *>(this)) @@ -1059,7 +1059,7 @@ CapturedStmt *CapturedStmt::Create(const ASTContext &Context, Stmt *S, unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (Captures.size() + 1); if (!Captures.empty()) { // Realign for the following Capture array. - Size = llvm::alignTo(Size, llvm::alignOf<Capture>()); + Size = llvm::alignTo(Size, alignof(Capture)); Size += sizeof(Capture) * Captures.size(); } @@ -1072,7 +1072,7 @@ CapturedStmt *CapturedStmt::CreateDeserialized(const ASTContext &Context, unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (NumCaptures + 1); if (NumCaptures > 0) { // Realign for the following Capture array. - Size = llvm::alignTo(Size, llvm::alignOf<Capture>()); + Size = llvm::alignTo(Size, alignof(Capture)); Size += sizeof(Capture) * NumCaptures; } |