mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-19 09:26:59 +00:00
Update the documentation for API change to CreateASTConsumer the rest of the way.
llvm-svn: 220450
This commit is contained in:
parent
5974ee637e
commit
d935be3568
@ -27,7 +27,8 @@ unit.
|
||||
public:
|
||||
virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
|
||||
clang::CompilerInstance &Compiler, llvm::StringRef InFile) {
|
||||
return new FindNamedClassConsumer;
|
||||
return std::unique_ptr<clang::ASTConsumer>(
|
||||
new FindNamedClassConsumer);
|
||||
}
|
||||
};
|
||||
|
||||
@ -111,9 +112,10 @@ freshly created FindNamedClassConsumer:
|
||||
|
||||
::
|
||||
|
||||
virtual clang::ASTConsumer *CreateASTConsumer(
|
||||
virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
|
||||
clang::CompilerInstance &Compiler, llvm::StringRef InFile) {
|
||||
return new FindNamedClassConsumer(&Compiler.getASTContext());
|
||||
return std::unique_ptr<clang::ASTConsumer>(
|
||||
new FindNamedClassConsumer(&Compiler.getASTContext()));
|
||||
}
|
||||
|
||||
Now that the ASTContext is available in the RecursiveASTVisitor, we can
|
||||
@ -185,9 +187,10 @@ Now we can combine all of the above into a small example program:
|
||||
|
||||
class FindNamedClassAction : public clang::ASTFrontendAction {
|
||||
public:
|
||||
virtual clang::ASTConsumer *CreateASTConsumer(
|
||||
virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
|
||||
clang::CompilerInstance &Compiler, llvm::StringRef InFile) {
|
||||
return new FindNamedClassConsumer(&Compiler.getASTContext());
|
||||
return std::unique_ptr<clang::ASTConsumer>(
|
||||
new FindNamedClassConsumer(&Compiler.getASTContext()));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user