git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119309
91177308-0d34-0410-b5e6-
96231b3b80d8
#ifndef LLVM_OBJECT_OBJECT_FILE_H
#define LLVM_OBJECT_OBJECT_FILE_H
#ifndef LLVM_OBJECT_OBJECT_FILE_H
#define LLVM_OBJECT_OBJECT_FILE_H
-#include "llvm/ADT/Triple.h"
-#include "llvm/System/Path.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/System/DataTypes.h"
namespace llvm {
class MemoryBuffer;
namespace llvm {
class MemoryBuffer;
virtual uint8_t getBytesInAddress() const = 0;
virtual StringRef getFileFormatName() const = 0;
virtual uint8_t getBytesInAddress() const = 0;
virtual StringRef getFileFormatName() const = 0;
- virtual Triple::ArchType getArch() const = 0;
+ virtual /* Triple::ArchType */ unsigned getArch() const = 0;
StringRef getFilename() const;
StringRef getFilename() const;
/// @param ObjectPath The path to the object file. ObjectPath.isObject must
/// return true.
/// @brief Create ObjectFile from path.
/// @param ObjectPath The path to the object file. ObjectPath.isObject must
/// return true.
/// @brief Create ObjectFile from path.
- static ObjectFile *createObjectFile(const sys::Path &ObjectPath);
+ static ObjectFile *createObjectFile(StringRef ObjectPath);
static ObjectFile *createObjectFile(MemoryBuffer *Object);
private:
static ObjectFile *createObjectFile(MemoryBuffer *Object);
private:
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/System/Path.h"
-namespace llvm {
-namespace object {
+using namespace llvm;
+using namespace object;
ObjectFile::ObjectFile(MemoryBuffer *Object)
: MapFile(Object) {
ObjectFile::ObjectFile(MemoryBuffer *Object)
: MapFile(Object) {
-ObjectFile *ObjectFile::createObjectFile(const sys::Path &ObjectPath) {
- return createObjectFile(MemoryBuffer::getFile(ObjectPath.c_str()));
+ObjectFile *ObjectFile::createObjectFile(StringRef ObjectPath) {
+ return createObjectFile(MemoryBuffer::getFile(ObjectPath));
-
-} // end namespace object
-} // end namespace llvm