Initial commit of LLVM 3.4

This commit is contained in:
Pascal Junod
2014-01-07 11:45:01 +01:00
parent 569cee53d0
commit 0c32ada97e
10493 changed files with 713743 additions and 208975 deletions
+31
View File
@@ -13,13 +13,44 @@
//===----------------------------------------------------------------------===//
#include "RemoteTarget.h"
#include "RemoteTargetExternal.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/Memory.h"
#include <stdlib.h>
#include <string>
using namespace llvm;
// Static methods
RemoteTarget *RemoteTarget::createRemoteTarget() {
return new RemoteTarget;
}
RemoteTarget *RemoteTarget::createExternalRemoteTarget(std::string &ChildName) {
#ifdef LLVM_ON_UNIX
return new RemoteTargetExternal(ChildName);
#else
return 0;
#endif
}
bool RemoteTarget::hostSupportsExternalRemoteTarget() {
#ifdef LLVM_ON_UNIX
return true;
#else
return false;
#endif
}
////////////////////////////////////////////////////////////////////////////////
// Simulated remote execution
//
// This implementation will simply move generated code and data to a new memory
// location in the current executable and let it run from there.
////////////////////////////////////////////////////////////////////////////////
bool RemoteTarget::allocateSpace(size_t Size, unsigned Alignment,
uint64_t &Address) {
sys::MemoryBlock *Prev = Allocations.size() ? &Allocations.back() : NULL;