Running clang-format on alloy.

All except x64_sequences, which needs work.
This commit is contained in:
Ben Vanik
2014-07-10 20:20:00 -07:00
parent 0158380cfc
commit 7daa85179c
139 changed files with 6925 additions and 6998 deletions

View File

@@ -13,16 +13,11 @@
#include <alloy/runtime/function.h>
#include <alloy/runtime/runtime.h>
using namespace alloy;
using namespace alloy::runtime;
namespace alloy {
namespace runtime {
Instrument::Instrument(Runtime* runtime) :
runtime_(runtime),
memory_(runtime->memory()),
is_attached_(false) {
}
Instrument::Instrument(Runtime* runtime)
: runtime_(runtime), memory_(runtime->memory()), is_attached_(false) {}
Instrument::~Instrument() {
if (is_attached_) {
@@ -34,7 +29,7 @@ bool Instrument::Attach() {
if (is_attached_) {
return false;
}
//runtime->AttachInstrument(this);
// runtime->AttachInstrument(this);
is_attached_ = true;
return true;
}
@@ -44,16 +39,12 @@ bool Instrument::Detach() {
return false;
}
is_attached_ = false;
//runtime->DetachInstrument(this);
// runtime->DetachInstrument(this);
return true;
}
FunctionInstrument::FunctionInstrument(
Runtime* runtime, Function* function) :
target_(function),
Instrument(runtime) {
}
FunctionInstrument::FunctionInstrument(Runtime* runtime, Function* function)
: target_(function), Instrument(runtime) {}
bool FunctionInstrument::Attach() {
if (!Instrument::Attach()) {
@@ -88,12 +79,9 @@ void FunctionInstrument::Exit(ThreadState* thread_state) {
//
}
MemoryInstrument::MemoryInstrument(
Runtime* runtime, uint64_t address, uint64_t end_address) :
address_(address), end_address_(end_address),
Instrument(runtime) {
}
MemoryInstrument::MemoryInstrument(Runtime* runtime, uint64_t address,
uint64_t end_address)
: address_(address), end_address_(end_address), Instrument(runtime) {}
bool MemoryInstrument::Attach() {
if (!Instrument::Attach()) {
@@ -116,7 +104,10 @@ bool MemoryInstrument::Detach() {
return true;
}
void MemoryInstrument::Access(
ThreadState* thread_state, uint64_t address, AccessType type) {
void MemoryInstrument::Access(ThreadState* thread_state, uint64_t address,
AccessType type) {
// TODO(benvanik): get thread local instance
}
} // namespace runtime
} // namespace alloy