@@ -113,7 +113,7 @@ void Parser::ReadClassLayout(Class* Class, const clang::RecordDecl* RD,
113
113
114
114
// Vtable pointer.
115
115
if (CXXRD->isDynamicClass () && !PrimaryBase &&
116
- !c->getASTContext (). getTargetInfo ().getCXXABI ().isMicrosoft ()) {
116
+ !c->getTarget ().getCXXABI ().isMicrosoft ()) {
117
117
auto VPtr = WalkVTablePointer (Parent, Offset, " vptr" );
118
118
Class->layout ->Fields .push_back (VPtr);
119
119
}
@@ -2870,7 +2870,7 @@ bool Parser::CanCheckCodeGenInfo(clang::Sema& S, const clang::Type* Ty)
2870
2870
2871
2871
// Lock in the MS inheritance model if we have a member pointer to a class,
2872
2872
// else we get an assertion error inside Clang's codegen machinery.
2873
- if (c->getASTContext (). getTargetInfo ().getCXXABI ().isMicrosoft ())
2873
+ if (c->getTarget ().getCXXABI ().isMicrosoft ())
2874
2874
{
2875
2875
if (auto MPT = Ty->getAs <clang::MemberPointerType>())
2876
2876
if (!MPT->isDependentType ())
@@ -4049,8 +4049,8 @@ ParserResult* Parser::ParseHeader(const std::vector<std::string>& SourceFiles)
4049
4049
llvm::LLVMContext Ctx;
4050
4050
std::unique_ptr<llvm::Module> M (new llvm::Module (" " , Ctx));
4051
4051
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 ());
4054
4054
4055
4055
std::unique_ptr<clang::CodeGen::CodeGenModule> CGM (
4056
4056
new clang::CodeGen::CodeGenModule (c->getASTContext (), c->getHeaderSearchOpts (),
@@ -4291,7 +4291,7 @@ ParserTargetInfo* Parser::GetTargetInfo()
4291
4291
{
4292
4292
auto parserTargetInfo = new ParserTargetInfo ();
4293
4293
4294
- auto & TI = c->getASTContext (). getTargetInfo ();
4294
+ auto & TI = c->getTarget ();
4295
4295
parserTargetInfo->ABI = TI.getABI ();
4296
4296
4297
4297
parserTargetInfo->char16Type = ConvertIntType (TI.getChar16Type ());
0 commit comments