Fix some trivial compiler warnings

"moving a local object in a return statement prevents copy elision" as
well as an unused variable and function referenced only from an assert.
This commit is contained in:
Jonas Hahnfeld 2022-04-12 10:11:37 +02:00 committed by jenkins
parent 1cba6d415c
commit 106e1771aa
2 changed files with 5 additions and 3 deletions

View File

@ -28,11 +28,11 @@ namespace cling {
/// falling back to our symbol resolution logic.
class HostLookupLazyFallbackGenerator : public DefinitionGenerator {
const IncrementalExecutor & m_IncrExecutor;
char m_GlobalPrefix;
// char m_GlobalPrefix;
public:
HostLookupLazyFallbackGenerator(const IncrementalExecutor &Exe,
char GlobalPrefix)
: m_IncrExecutor(Exe), m_GlobalPrefix(GlobalPrefix) { }
: m_IncrExecutor(Exe)/*, m_GlobalPrefix(GlobalPrefix)*/ { }
Error tryToGenerate(LookupState& LS, LookupKind K, JITDylib& JD,
JITDylibLookupFlags JDLookupFlags,
@ -183,7 +183,7 @@ llvm::Error IncrementalJIT::removeModule(const Transaction& T) {
m_ResourceTrackers.erase(&T);
if (Error Err = RT->remove())
return std::move(Err);
return Err;
return llvm::Error::success();
}

View File

@ -106,9 +106,11 @@ namespace cling {
return Successful;
}
#ifndef NDEBUG
static bool isPracticallyEmptyModule(const llvm::Module* M) {
return M->empty() && M->global_empty() && M->alias_empty();
}
#endif
bool TransactionUnloader::RevertTransaction(Transaction* T) {