Remove unnecessary StringRefs and strlen calls to construct them.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
This commit is contained in:
parent
c3869d00cc
commit
8f44fe40c5
@ -157,10 +157,9 @@ void* IncrementalExecutor::NotifyLazyFunctionCreators(const std::string& mangled
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
llvm::StringRef name(mangled_name);
|
||||
void *address = nullptr;
|
||||
if (m_externalIncrementalExecutor)
|
||||
address = m_externalIncrementalExecutor->getAddressOfGlobal(name);
|
||||
address = m_externalIncrementalExecutor->getAddressOfGlobal(mangled_name);
|
||||
|
||||
return (address ? address : HandleMissingFunction(mangled_name));
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ namespace cling {
|
||||
std::string mangledNameIfNeeded;
|
||||
utils::Analyze::maybeMangleDeclName(FD, mangledNameIfNeeded);
|
||||
IncrementalExecutor::ExecutionResult ExeRes =
|
||||
m_Executor->executeWrapper(mangledNameIfNeeded.c_str(), res);
|
||||
m_Executor->executeWrapper(mangledNameIfNeeded, res);
|
||||
return ConvertExecutionResult(ExeRes);
|
||||
}
|
||||
|
||||
@ -1210,7 +1210,7 @@ namespace cling {
|
||||
// Return a symbol's address, and whether it was jitted.
|
||||
std::string mangledName;
|
||||
utils::Analyze::maybeMangleDeclName(GD, mangledName);
|
||||
return getAddressOfGlobal(mangledName.c_str(), fromJIT);
|
||||
return getAddressOfGlobal(mangledName, fromJIT);
|
||||
}
|
||||
|
||||
void* Interpreter::getAddressOfGlobal(llvm::StringRef SymName,
|
||||
|
Loading…
Reference in New Issue
Block a user