Jit code style fixes (#2741)

This commit is contained in:
Ivan Butygin 2018-06-10 15:16:35 +03:00 committed by GitHub
parent 46e6b8f681
commit 9c048c635c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 53 additions and 45 deletions

View file

@ -16,15 +16,15 @@
#include <cassert>
#include <llvm/ADT/StringExtras.h>
#include <llvm/ExecutionEngine/RuntimeDyld.h>
#include <llvm/ExecutionEngine/SectionMemoryManager.h>
#include <llvm/IR/Module.h>
#include <llvm/Support/DynamicLibrary.h>
#include <llvm/Support/Host.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Target/TargetMachine.h>
#include "llvm/ADT/StringExtras.h"
#include "llvm/ExecutionEngine/RuntimeDyld.h"
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
namespace {
@ -77,6 +77,16 @@ auto getSymbolInProcess(const std::string &name)
} // anon namespace
JITContext::ListenerCleaner::ListenerCleaner(JITContext &o,
llvm::raw_ostream *stream)
: owner(o) {
owner.listenerlayer.getTransform().stream = stream;
}
JITContext::ListenerCleaner::~ListenerCleaner() {
owner.listenerlayer.getTransform().stream = nullptr;
}
JITContext::JITContext()
: targetmachine(createTargetMachine()),
dataLayout(targetmachine->createDataLayout()),