From b35a896e072ff46c38905419b7f55aaccdb1d702 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 19 Mar 2012 20:27:15 +0000 Subject: [Object/COFF]: Expose getSectionName. Also add some documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153050 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/Binary.h | 7 +++++++ include/llvm/Object/COFF.h | 1 + 2 files changed, 8 insertions(+) (limited to 'include/llvm/Object') diff --git a/include/llvm/Object/Binary.h b/include/llvm/Object/Binary.h index 81cdd32a73..77a08d597c 100644 --- a/include/llvm/Object/Binary.h +++ b/include/llvm/Object/Binary.h @@ -88,7 +88,14 @@ public: } }; +/// @brief Create a Binary from Source, autodetecting the file type. +/// +/// @param Source The data to create the Binary from. Ownership is transfered +/// to Result if successful. If an error is returned, Source is destroyed +/// by createBinary before returning. +/// @param Result A pointer to the resulting Binary if no error occured. error_code createBinary(MemoryBuffer *Source, OwningPtr &Result); + error_code createBinary(StringRef Path, OwningPtr &Result); } diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index fc33ab1035..f19ce6f19e 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -177,6 +177,7 @@ public: return ec; } error_code getSymbolName(const coff_symbol *symbol, StringRef &Res) const; + error_code getSectionName(const coff_section *Sec, StringRef &Res) const; static inline bool classof(const Binary *v) { return v->isCOFF(); -- cgit v1.2.3