mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-21 03:28:31 +00:00
Use a continue to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b685b0cf8
commit
b811509613
@ -88,26 +88,27 @@ void OProfileJITEventListener::NotifyObjectEmitted(
|
||||
// Use symbol info to iterate functions in the object.
|
||||
for (const std::pair<SymbolRef, uint64_t> &P : computeSymbolSizes(DebugObj)) {
|
||||
SymbolRef Sym = P.first;
|
||||
if (Sym.getType() == SymbolRef::ST_Function) {
|
||||
ErrorOr<StringRef> NameOrErr = Sym.getName();
|
||||
if (NameOrErr.getError())
|
||||
continue;
|
||||
StringRef Name = *NameOrErr;
|
||||
ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
|
||||
if (AddrOrErr.getError())
|
||||
continue;
|
||||
uint64_t Addr = *AddrOrErr;
|
||||
uint64_t Size = P.second;
|
||||
if (Sym.getType() != SymbolRef::ST_Function)
|
||||
continue;
|
||||
|
||||
if (Wrapper->op_write_native_code(Name.data(), Addr, (void*)Addr, Size)
|
||||
== -1) {
|
||||
DEBUG(dbgs() << "Failed to tell OProfile about native function "
|
||||
<< Name << " at ["
|
||||
<< (void*)Addr << "-" << ((char*)Addr + Size) << "]\n");
|
||||
continue;
|
||||
}
|
||||
// TODO: support line number info (similar to IntelJITEventListener.cpp)
|
||||
ErrorOr<StringRef> NameOrErr = Sym.getName();
|
||||
if (NameOrErr.getError())
|
||||
continue;
|
||||
StringRef Name = *NameOrErr;
|
||||
ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
|
||||
if (AddrOrErr.getError())
|
||||
continue;
|
||||
uint64_t Addr = *AddrOrErr;
|
||||
uint64_t Size = P.second;
|
||||
|
||||
if (Wrapper->op_write_native_code(Name.data(), Addr, (void *)Addr, Size) ==
|
||||
-1) {
|
||||
DEBUG(dbgs() << "Failed to tell OProfile about native function " << Name
|
||||
<< " at [" << (void *)Addr << "-" << ((char *)Addr + Size)
|
||||
<< "]\n");
|
||||
continue;
|
||||
}
|
||||
// TODO: support line number info (similar to IntelJITEventListener.cpp)
|
||||
}
|
||||
|
||||
DebugObjects[Obj.getData().data()] = std::move(DebugObjOwner);
|
||||
|
Loading…
Reference in New Issue
Block a user