1
0
mirror of https://github.com/exaloop/codon.git synced 2025-06-03 15:03:52 +08:00

Remove unused class

This commit is contained in:
A. R. Shajii 2021-11-13 22:24:05 -05:00
parent 8edd5bc6e0
commit ca414b498a

View File

@ -380,26 +380,6 @@ void LLVMVisitor::compile(const std::string &filename,
}
namespace {
class DebugInfoListener : public llvm::JITEventListener {
public:
std::pair<std::unique_ptr<llvm::object::ObjectFile>,
std::unique_ptr<llvm::MemoryBuffer>>
saved;
intptr_t start = 0;
void notifyObjectLoaded(ObjectKey key, const llvm::object::ObjectFile &obj,
const llvm::RuntimeDyld::LoadedObjectInfo &L) override {
start = L.getSectionLoadAddress(*obj.section_begin());
saved = L.getObjectForDebug(obj).takeBinary();
if (!saved.first) {
auto buf = llvm::MemoryBuffer::getMemBufferCopy(obj.getData(), obj.getFileName());
auto newObj = llvm::cantFail(
llvm::object::ObjectFile::createObjectFile(buf->getMemBufferRef()));
saved = std::make_pair(std::move(newObj), std::move(buf));
}
}
};
std::string unmangleType(llvm::StringRef s) {
auto p = s.rsplit('.');
return (p.second.empty() ? p.first : p.second).str();