Fixing build break due to MemberExpr new -> create changes.

Hash c32ef4bc0b17f79d96b672143d5e5fba9e39ea8d (llvm monorepo) changed the
allocation interface from new to create.

(cherry picked from commit 0e4add8510)
This commit is contained in:
Puyan Lotfi
2019-06-04 19:11:06 -07:00
parent 326338b041
commit 9f1204d817

View File

@@ -1140,14 +1140,14 @@ makeBitFieldAccessors(ClangImporter::Implementation &Impl,
recordType, recordType,
clang::VK_RValue, clang::VK_RValue,
clang::SourceLocation()); clang::SourceLocation());
auto cGetterExpr = new (Ctx) clang::MemberExpr(cGetterSelfExpr, auto cGetterExpr = clang::MemberExpr::CreateImplicit(Ctx,
/*isarrow=*/ false, cGetterSelfExpr,
clang::SourceLocation(), /*isarrow=*/ false,
fieldDecl, fieldDecl,
fieldNameInfo, fieldType,
fieldType, clang::VK_RValue,
clang::VK_RValue, clang::OK_BitField);
clang::OK_BitField);
auto cGetterBody = clang::ReturnStmt::Create(Ctx, clang::SourceLocation(), auto cGetterBody = clang::ReturnStmt::Create(Ctx, clang::SourceLocation(),
cGetterExpr, cGetterExpr,
@@ -1185,14 +1185,13 @@ makeBitFieldAccessors(ClangImporter::Implementation &Impl,
clang::VK_RValue, clang::VK_RValue,
clang::SourceLocation()); clang::SourceLocation());
auto cSetterMemberExpr = new (Ctx) clang::MemberExpr(cSetterSelfExpr, auto cSetterMemberExpr = clang::MemberExpr::CreateImplicit(Ctx,
/*isarrow=*/ true, cSetterSelfExpr,
clang::SourceLocation(), /*isarrow=*/true,
fieldDecl, fieldDecl,
fieldNameInfo, fieldType,
fieldType, clang::VK_LValue,
clang::VK_LValue, clang::OK_BitField);
clang::OK_BitField);
auto cSetterValueExpr = new (Ctx) clang::DeclRefExpr(Ctx, cSetterValue, false, auto cSetterValueExpr = new (Ctx) clang::DeclRefExpr(Ctx, cSetterValue, false,
fieldType, fieldType,