Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: include/llvm/Object/ObjectFile.h

Issue 9617030: Distinguish between ELF 32/64, little/big endian, in the type system of Binary.h (Closed) Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: x Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/llvm/Object/MachO.h ('k') | lib/Object/Archive.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- ObjectFile.h - File format independent object file -------*- C++ -*-===// 1 //===- ObjectFile.h - File format independent object file -------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares a file format independent ObjectFile class. 10 // This file declares a file format independent ObjectFile class.
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 virtual StringRef getLoadName() const = 0; 365 virtual StringRef getLoadName() const = 0;
366 366
367 /// @returns Pointer to ObjectFile subclass to handle this type of object. 367 /// @returns Pointer to ObjectFile subclass to handle this type of object.
368 /// @param ObjectPath The path to the object file. ObjectPath.isObject must 368 /// @param ObjectPath The path to the object file. ObjectPath.isObject must
369 /// return true. 369 /// return true.
370 /// @brief Create ObjectFile from path. 370 /// @brief Create ObjectFile from path.
371 static ObjectFile *createObjectFile(StringRef ObjectPath); 371 static ObjectFile *createObjectFile(StringRef ObjectPath);
372 static ObjectFile *createObjectFile(MemoryBuffer *Object); 372 static ObjectFile *createObjectFile(MemoryBuffer *Object);
373 373
374 static inline bool classof(const Binary *v) { 374 static inline bool classof(const Binary *v) {
375 return v->getType() >= isObject && 375 return v->isObject();
376 v->getType() < lastObject;
377 } 376 }
378 static inline bool classof(const ObjectFile *v) { return true; } 377 static inline bool classof(const ObjectFile *v) { return true; }
379 378
380 public: 379 public:
381 static ObjectFile *createCOFFObjectFile(MemoryBuffer *Object); 380 static ObjectFile *createCOFFObjectFile(MemoryBuffer *Object);
382 static ObjectFile *createELFObjectFile(MemoryBuffer *Object); 381 static ObjectFile *createELFObjectFile(MemoryBuffer *Object);
383 static ObjectFile *createMachOObjectFile(MemoryBuffer *Object); 382 static ObjectFile *createMachOObjectFile(MemoryBuffer *Object);
384 }; 383 };
385 384
386 // Inline function definitions. 385 // Inline function definitions.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 565 }
567 566
568 inline error_code LibraryRef::getPath(StringRef &Result) const { 567 inline error_code LibraryRef::getPath(StringRef &Result) const {
569 return OwningObject->getLibraryPath(LibraryPimpl, Result); 568 return OwningObject->getLibraryPath(LibraryPimpl, Result);
570 } 569 }
571 570
572 } // end namespace object 571 } // end namespace object
573 } // end namespace llvm 572 } // end namespace llvm
574 573
575 #endif 574 #endif
OLDNEW
« no previous file with comments | « include/llvm/Object/MachO.h ('k') | lib/Object/Archive.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698