mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#include "Config/sys/mman.h"
|
||||
#include "Config/fcntl.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
namespace {
|
||||
struct ar_hdr {
|
||||
char name[16];
|
||||
@@ -40,7 +42,6 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// getObjectType - Determine the type of object that this header represents.
|
||||
// This is capable of parsing the variety of special sections used for various
|
||||
// purposes.
|
||||
@@ -173,3 +174,5 @@ bool ReadArchiveFile(const std::string &Filename, std::vector<Module*> &Objects,
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "llvm/Constants.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
const Type *BytecodeParser::parseTypeConstant(const unsigned char *&Buf,
|
||||
const unsigned char *EndBuf) {
|
||||
unsigned PrimType;
|
||||
@@ -356,3 +358,5 @@ void BytecodeParser::ParseConstantPool(const unsigned char *&Buf,
|
||||
|
||||
if (Buf > EndBuf) throw std::string("Read past end of buffer.");
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "llvm/iOther.h"
|
||||
#include "llvm/Module.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
namespace {
|
||||
struct RawInst { // The raw fields out of the bytecode stream...
|
||||
unsigned NumOperands;
|
||||
@@ -33,8 +35,6 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
RawInst::RawInst(const unsigned char *&Buf, const unsigned char *EndBuf,
|
||||
std::vector<unsigned> &Args) {
|
||||
unsigned Op, Typ;
|
||||
@@ -389,3 +389,5 @@ void BytecodeParser::ParseInstruction(const unsigned char *&Buf,
|
||||
BB->getInstList().push_back(Result);
|
||||
BCR_TRACE(4, *Result);
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
static inline void ALIGN32(const unsigned char *&begin,
|
||||
const unsigned char *end) {
|
||||
if (align32(begin, end))
|
||||
@@ -693,3 +695,5 @@ void BytecodeParser::ParseBytecode(const unsigned char *Buf, unsigned Length,
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <utility>
|
||||
#include <map>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
// Enable to trace to figure out what the heck is going on when parsing fails
|
||||
//#define TRACE_LEVEL 10
|
||||
//#define DEBUG_OUTPUT
|
||||
@@ -226,4 +228,6 @@ static inline void readBlock(const unsigned char *&Buf,
|
||||
#endif
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "Config/unistd.h"
|
||||
#include "Config/sys/mman.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// BytecodeFileReader - Read from an mmap'able file descriptor.
|
||||
//
|
||||
@@ -163,7 +165,7 @@ BytecodeStdinReader::BytecodeStdinReader() {
|
||||
unsigned char Buffer[4096*4];
|
||||
|
||||
// Read in all of the data from stdin, we cannot mmap stdin...
|
||||
while ((BlockSize = read(0 /*stdin*/, Buffer, 4096*4))) {
|
||||
while ((BlockSize = ::read(0 /*stdin*/, Buffer, 4096*4))) {
|
||||
if (BlockSize == -1)
|
||||
throw std::string("Error reading from stdin!");
|
||||
|
||||
@@ -249,7 +251,6 @@ static ModuleProvider *CheckVarargs(ModuleProvider *MP) {
|
||||
return MP;
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Wrapper functions
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -296,3 +297,5 @@ Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
Reference in New Issue
Block a user