Update for new FileNotFound callback
This commit is contained in:
parent
2c98e68e68
commit
aa2213e121
@ -116,8 +116,7 @@ namespace cling {
|
||||
clang::SourceLocation /*ImportLoc*/,
|
||||
bool /*ForPragma*/) {}
|
||||
|
||||
virtual bool FileNotFound(llvm::StringRef FileName,
|
||||
llvm::SmallVectorImpl<char>& RecoveryPath);
|
||||
virtual bool FileNotFound(llvm::StringRef FileName);
|
||||
|
||||
/// \brief This callback is invoked whenever the interpreter needs to
|
||||
/// resolve the type and the adress of an object, which has been marked for
|
||||
|
@ -57,12 +57,12 @@ namespace cling {
|
||||
m_Callbacks->EnteredSubmodule(M, ImportLoc, ForPragma);
|
||||
}
|
||||
|
||||
bool FileNotFound(llvm::StringRef FileName,
|
||||
llvm::SmallVectorImpl<char>& RecoveryPath) override {
|
||||
bool FileNotFound(llvm::StringRef FileName) override {
|
||||
if (m_Callbacks)
|
||||
return m_Callbacks->FileNotFound(FileName, RecoveryPath);
|
||||
return m_Callbacks->FileNotFound(FileName);
|
||||
|
||||
// Returning true would mean that the preprocessor should try to recover.
|
||||
// Returning true would mean that the preprocessor should silently skip
|
||||
// this file.
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@ -387,8 +387,7 @@ namespace cling {
|
||||
return m_DeserializationListener.get();
|
||||
}
|
||||
|
||||
bool InterpreterCallbacks::FileNotFound(llvm::StringRef,
|
||||
llvm::SmallVectorImpl<char>&) {
|
||||
bool InterpreterCallbacks::FileNotFound(llvm::StringRef) {
|
||||
// Default implementation is no op.
|
||||
return false;
|
||||
}
|
||||
|
@ -48,11 +48,10 @@ namespace cling {
|
||||
cb->EnteredSubmodule(M, ImportLoc, ForPragma);
|
||||
}
|
||||
|
||||
bool FileNotFound(llvm::StringRef FileName,
|
||||
llvm::SmallVectorImpl<char>& RecoveryPath) override {
|
||||
bool FileNotFound(llvm::StringRef FileName) override {
|
||||
bool result = false;
|
||||
for (auto&& cb : m_Callbacks)
|
||||
result = cb->FileNotFound(FileName, RecoveryPath) || result;
|
||||
result = cb->FileNotFound(FileName) || result;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user