mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-04 01:26:41 +00:00
Fix build with -DLLVM_USE_INTEL_JITEVENTS=ON -DLLVM_USE_OPROFILE=ON.
Is anyone using those? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241372 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
177fabfc30
commit
643de689aa
@ -118,9 +118,10 @@ void IntelJITEventListener::NotifyObjectEmitted(
|
||||
if (!Name)
|
||||
continue;
|
||||
|
||||
uint64_t Addr;
|
||||
if (Sym.getAddress(Addr))
|
||||
ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
|
||||
if (AddrOrErr.getError())
|
||||
continue;
|
||||
uint64_t Addr = *AddrOrErr;
|
||||
uint64_t Size = P.second;
|
||||
|
||||
// Record this address in a local vector
|
||||
|
@ -89,12 +89,14 @@ void OProfileJITEventListener::NotifyObjectEmitted(
|
||||
for (const std::pair<SymbolRef, uint64_t> &P : computeSymbolSizes(DebugObj)) {
|
||||
SymbolRef Sym = P.first;
|
||||
if (Sym.getType() == SymbolRef::ST_Function) {
|
||||
StringRef Name;
|
||||
uint64_t Addr;
|
||||
if (Sym.getName(Name))
|
||||
ErrorOr<StringRef> NameOrErr = Sym.getName();
|
||||
if (NameOrErr.getError())
|
||||
continue;
|
||||
if (Sym.getAddress(Addr))
|
||||
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)
|
||||
@ -126,8 +128,10 @@ void OProfileJITEventListener::NotifyFreeingObject(const ObjectFile &Obj) {
|
||||
E = DebugObj.symbol_end();
|
||||
I != E; ++I) {
|
||||
if (I->getType() == SymbolRef::ST_Function) {
|
||||
uint64_t Addr;
|
||||
if (I->getAddress(Addr)) continue;
|
||||
ErrorOr<uint64_t> AddrOrErr = I->getAddress();
|
||||
if (AddrOrErr.getError())
|
||||
continue;
|
||||
uint64_t Addr = *AddrOrErr;
|
||||
|
||||
if (Wrapper->op_unload_native_code(Addr) == -1) {
|
||||
DEBUG(dbgs()
|
||||
|
@ -6,7 +6,7 @@ include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} )
|
||||
set(LLVM_LINK_COMPONENTS
|
||||
asmparser
|
||||
bitreader
|
||||
debuginfo
|
||||
DebugInfoDWARF
|
||||
inteljitevents
|
||||
interpreter
|
||||
irreader
|
||||
|
Loading…
x
Reference in New Issue
Block a user