search for: lookupsymbol

Displaying 2 results from an estimated 2 matches for "lookupsymbol".

2019 Jan 18
2
Can't find symbol from llvm backend
...(*m, tmp->getType(), true, llvm::GlobalValue::ExternalLinkage, tmp, "test_llvm_var"); where tmp is a function. Then I tried to access this global variable in the back end MachineFunctionPass like this: MCContext& MCC = MF.getContext(); MCSymbol* MCS = MCC.lookupSymbol("test_llvm_var"); if (MCS == NULL) { errs() << ">>> MCSymbol is null\n"; } else { MCS->dump(); } (MF is a MachineFunction). However I always get MCS==NULL, there is no symbol cal...
2019 Jan 19
3
Can't find symbol from llvm backend
...mp, "test_llvm_var"); > > > > where tmp is a function. > > > > Then I tried to access this global variable in the back end > MachineFunctionPass like this: > > > > MCContext& MCC = MF.getContext(); > MCSymbol* MCS = MCC.lookupSymbol("test_llvm_var"); > if (MCS == NULL) { > errs() << ">>> MCSymbol is null\n"; > } > else { > MCS->dump(); > } > > > > (MF is a MachineFunction). > &...