diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 66aae9f5..f8614b7a 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -20,6 +20,8 @@ source first. Building in *Release* is recommended because else the Clang parser will be excruciatingly slow. +Last updated to LLVM/Clang revision: `r193383` + ## Generating bindings Suppose we have the following declarations in a file named `Sample.h` and we diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 8ed105b2..9eea12ea 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -233,12 +233,10 @@ std::string Parser::GetDeclMangledName(clang::Decl* D, clang::TargetCXXABI ABI, llvm_unreachable("Unknown mangling ABI"); break; case TargetCXXABI::GenericItanium: - MC.reset(createItaniumMangleContext(*AST, AST->getDiagnostics())); - //AST->setCXXABI(CreateItaniumCXXABI(*AST)); + MC.reset(ItaniumMangleContext::create(*AST, AST->getDiagnostics())); break; case TargetCXXABI::Microsoft: - MC.reset(createMicrosoftMangleContext(*AST, AST->getDiagnostics())); - //AST->setCXXABI(CreateMicrosoftCXXABI(*AST)); + MC.reset(MicrosoftMangleContext::create(*AST, AST->getDiagnostics())); break; } @@ -516,7 +514,7 @@ void Parser::WalkVTable(clang::CXXRecordDecl* RD, Class* C) case TargetCXXABI::GenericItanium: { C->Layout.ABI = CppAbi::Itanium; - VTableContext VTContext(*AST); + ItaniumVTableContext VTContext(*AST); auto& VTLayout = VTContext.getVTableLayout(RD); C->Layout.Layout = WalkVTableLayout(VTLayout); @@ -2015,7 +2013,7 @@ Declaration* Parser::WalkDeclaration(clang::Decl* D, case Decl::Function: { FunctionDecl* FD = cast(D); - if (!FD->isFirstDeclaration()) + if (!FD->isFirstDecl()) break; // Check for and ignore built-in functions. diff --git a/src/Parser/Parser.cpp b/src/Parser/Parser.cpp index 588d6cde..bde92010 100644 --- a/src/Parser/Parser.cpp +++ b/src/Parser/Parser.cpp @@ -234,12 +234,10 @@ std::string Parser::GetDeclMangledName(clang::Decl* D, clang::TargetCXXABI ABI, llvm_unreachable("Unknown mangling ABI"); break; case TargetCXXABI::GenericItanium: - MC.reset(createItaniumMangleContext(*AST, AST->getDiagnostics())); - //AST->setCXXABI(CreateItaniumCXXABI(*AST)); + MC.reset(ItaniumMangleContext::create(*AST, AST->getDiagnostics())); break; case TargetCXXABI::Microsoft: - MC.reset(createMicrosoftMangleContext(*AST, AST->getDiagnostics())); - //AST->setCXXABI(CreateMicrosoftCXXABI(*AST)); + MC.reset(MicrosoftMangleContext::create(*AST, AST->getDiagnostics())); break; } @@ -518,7 +516,7 @@ void Parser::WalkVTable(clang::CXXRecordDecl* RD, CppSharp::AST::Class^ C) case TargetCXXABI::GenericItanium: { C->Layout->ABI = CppSharp::AST::CppAbi::Itanium; - VTableContext VTContext(*AST); + ItaniumVTableContext VTContext(*AST); auto& VTLayout = VTContext.getVTableLayout(RD); C->Layout->Layout = WalkVTableLayout(VTLayout); @@ -2022,7 +2020,7 @@ CppSharp::AST::Declaration^ Parser::WalkDeclaration(clang::Decl* D, case Decl::Function: { FunctionDecl* FD = cast(D); - if (!FD->isFirstDeclaration()) + if (!FD->isFirstDecl()) break; // Check for and ignore built-in functions.