Skip to content

Commit

Permalink
fix llvm upgrade bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
moyix committed Aug 12, 2024
1 parent 5f2cf80 commit 51f2824
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/lavaTool/include/MatchFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ class LavaMatchFinder : public MatchFinder, public SourceFileCallbacks {
);
}

// TODO: WARNING, I HAVE REMOVED OVERRIDE, I REALLY HOPE I DON'T REGRET THIS!
virtual bool handleBeginSource(CompilerInstance &CI, StringRef Filename) {
virtual bool handleBeginSource(CompilerInstance &CI) override {
Insert.clear();
Mod.Reset(&CI.getLangOpts(), &CI.getSourceManager());
TUReplace.Replacements.clear();
std::string Filename = CI.getSourceManager().getFileEntryForID(CI.getSourceManager().getMainFileID())->getName().str(); // Convert StringRef to std::string
TUReplace.MainSourceFile = Filename;
CurrentCI = &CI;

Expand Down
2 changes: 1 addition & 1 deletion tools/lavaTool/src/lavaFnTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class CallPrinter : public MatchFinder::MatchCallback {
std::string fun_name = get_containing_function_name(Result, *call);
outfile << " containing_function: " << fun_name << "\n";

QualType rt = call->getDirectCallee()->getReturnType();
QualType rt = call->getCallReturnType(*Result.Context);
spit_type( " ret_type: ", rt);
outfile << " args: \n";
for (auto it = call->arg_begin(); it != call->arg_end(); ++it) {
Expand Down

0 comments on commit 51f2824

Please sign in to comment.