summaryrefslogtreecommitdiffstats
path: root/lib/AST/NestedNameSpecifier.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-10-20 14:27:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-10-20 14:27:22 +0000
commitfd352be22e927b1806bd13afc8b9b9ed8c0b1adc (patch)
tree6694865eb59588079952d3679509d0e241bb5612 /lib/AST/NestedNameSpecifier.cpp
parent6d0cbd7d8eb77b9df7f2e161fb70e877d944c29a (diff)
Retire llvm::alignOf in favor of C++11 alignof.
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/NestedNameSpecifier.cpp')
-rw-r--r--lib/AST/NestedNameSpecifier.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp
index 3883b641f1..514c7c9f5b 100644
--- a/lib/AST/NestedNameSpecifier.cpp
+++ b/lib/AST/NestedNameSpecifier.cpp
@@ -34,8 +34,8 @@ NestedNameSpecifier::FindOrInsert(const ASTContext &Context,
NestedNameSpecifier *NNS
= Context.NestedNameSpecifiers.FindNodeOrInsertPos(ID, InsertPos);
if (!NNS) {
- NNS = new (Context, llvm::alignOf<NestedNameSpecifier>())
- NestedNameSpecifier(Mockup);
+ NNS =
+ new (Context, alignof(NestedNameSpecifier)) NestedNameSpecifier(Mockup);
Context.NestedNameSpecifiers.InsertNode(NNS, InsertPos);
}
@@ -113,8 +113,7 @@ NestedNameSpecifier *
NestedNameSpecifier::GlobalSpecifier(const ASTContext &Context) {
if (!Context.GlobalNestedNameSpecifier)
Context.GlobalNestedNameSpecifier =
- new (Context, llvm::alignOf<NestedNameSpecifier>())
- NestedNameSpecifier();
+ new (Context, alignof(NestedNameSpecifier)) NestedNameSpecifier();
return Context.GlobalNestedNameSpecifier;
}
@@ -687,7 +686,7 @@ NestedNameSpecifierLocBuilder::getWithLocInContext(ASTContext &Context) const {
// FIXME: After copying the source-location information, should we free
// our (temporary) buffer and adopt the ASTContext-allocated memory?
// Doing so would optimize repeated calls to getWithLocInContext().
- void *Mem = Context.Allocate(BufferSize, llvm::alignOf<void *>());
+ void *Mem = Context.Allocate(BufferSize, alignof(void *));
memcpy(Mem, Buffer, BufferSize);
return NestedNameSpecifierLoc(Representation, Mem);
}