diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2013-06-10 20:36:52 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2013-06-10 20:36:52 +0000 | 
| commit | 59d6cff90eecf31cb3dd860c4e786674cfdd42eb (patch) | |
| tree | 909310b2e05119d1d6efda049977042abbb58bb1 /include/llvm/Object/ObjectFile.h | |
| parent | 4a16efa3e43e35f0cc9efe3a67f620f0017c3d36 (diff) | |
Notes
Diffstat (limited to 'include/llvm/Object/ObjectFile.h')
| -rw-r--r-- | include/llvm/Object/ObjectFile.h | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index 6a66653fe223..eb53cc0aab58 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -217,6 +217,8 @@ public:    /// mapped).    error_code getAddress(uint64_t &Result) const;    error_code getFileOffset(uint64_t &Result) const; +  /// @brief Get the alignment of this symbol as the actual value (not log 2). +  error_code getAlignment(uint32_t &Result) const;    error_code getSize(uint64_t &Result) const;    error_code getType(SymbolRef::Type &Result) const; @@ -227,9 +229,6 @@ public:    /// Get symbol flags (bitwise OR of SymbolRef::Flags)    error_code getFlags(uint32_t &Result) const; -  /// @brief Return true for common symbols such as uninitialized globals -  error_code isCommon(bool &Result) const; -    /// @brief Get section this symbol is defined in reference to. Result is    /// end_sections() if it is undefined or is an absolute symbol.    error_code getSection(section_iterator &Result) const; @@ -276,7 +275,7 @@ class ObjectFile : public Binary {    ObjectFile(const ObjectFile &other) LLVM_DELETED_FUNCTION;  protected: -  ObjectFile(unsigned int Type, MemoryBuffer *source, error_code &ec); +  ObjectFile(unsigned int Type, MemoryBuffer *source);    const uint8_t *base() const {      return reinterpret_cast<const uint8_t *>(Data->getBufferStart()); @@ -295,6 +294,7 @@ protected:    virtual error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const = 0;    virtual error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const = 0;    virtual error_code getSymbolFileOffset(DataRefImpl Symb, uint64_t &Res)const=0; +  virtual error_code getSymbolAlignment(DataRefImpl Symb, uint32_t &Res) const;    virtual error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const = 0;    virtual error_code getSymbolType(DataRefImpl Symb,                                     SymbolRef::Type &Res) const = 0; @@ -428,6 +428,10 @@ inline error_code SymbolRef::getFileOffset(uint64_t &Result) const {    return OwningObject->getSymbolFileOffset(SymbolPimpl, Result);  } +inline error_code SymbolRef::getAlignment(uint32_t &Result) const { +  return OwningObject->getSymbolAlignment(SymbolPimpl, Result); +} +  inline error_code SymbolRef::getSize(uint64_t &Result) const {    return OwningObject->getSymbolSize(SymbolPimpl, Result);  }  | 
