@@ -113,7 +113,7 @@ void Parser::ReadClassLayout(Class* Class, const clang::RecordDecl* RD,
113113
114114 // Vtable pointer.
115115 if (CXXRD->isDynamicClass () && !PrimaryBase &&
116- !c->getASTContext (). getTargetInfo ().getCXXABI ().isMicrosoft ()) {
116+ !c->getTarget ().getCXXABI ().isMicrosoft ()) {
117117 auto VPtr = WalkVTablePointer (Parent, Offset, " vptr" );
118118 Class->layout ->Fields .push_back (VPtr);
119119 }
@@ -2870,7 +2870,7 @@ bool Parser::CanCheckCodeGenInfo(clang::Sema& S, const clang::Type* Ty)
28702870
28712871 // Lock in the MS inheritance model if we have a member pointer to a class,
28722872 // else we get an assertion error inside Clang's codegen machinery.
2873- if (c->getASTContext (). getTargetInfo ().getCXXABI ().isMicrosoft ())
2873+ if (c->getTarget ().getCXXABI ().isMicrosoft ())
28742874 {
28752875 if (auto MPT = Ty->getAs <clang::MemberPointerType>())
28762876 if (!MPT->isDependentType ())
@@ -4049,8 +4049,8 @@ ParserResult* Parser::ParseHeader(const std::vector<std::string>& SourceFiles)
40494049 llvm::LLVMContext Ctx;
40504050 std::unique_ptr<llvm::Module> M (new llvm::Module (" " , Ctx));
40514051
4052- M->setTargetTriple (AST. getTargetInfo ().getTriple ().getTriple ());
4053- M->setDataLayout (AST. getTargetInfo ().getDataLayout ());
4052+ M->setTargetTriple (c-> getTarget ().getTriple ().getTriple ());
4053+ M->setDataLayout (c-> getTarget ().getDataLayout ());
40544054
40554055 std::unique_ptr<clang::CodeGen::CodeGenModule> CGM (
40564056 new clang::CodeGen::CodeGenModule (c->getASTContext (), c->getHeaderSearchOpts (),
@@ -4291,7 +4291,7 @@ ParserTargetInfo* Parser::GetTargetInfo()
42914291{
42924292 auto parserTargetInfo = new ParserTargetInfo ();
42934293
4294- auto & TI = c->getASTContext (). getTargetInfo ();
4294+ auto & TI = c->getTarget ();
42954295 parserTargetInfo->ABI = TI.getABI ();
42964296
42974297 parserTargetInfo->char16Type = ConvertIntType (TI.getChar16Type ());
0 commit comments