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,15 +1140,15 @@ 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,
cGetterSelfExpr,
/*isarrow=*/ false, /*isarrow=*/ false,
clang::SourceLocation(),
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,
nullptr); nullptr);
@@ -1185,11 +1185,10 @@ 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);