diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-04-30 21:51:13 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-04-30 21:51:13 +0000 |
commit | 593cb79eb5517d821248ba0698f35e0a6e65b6e4 (patch) | |
tree | 7521045d1983438cd46d2b57897932755aefa09b /include/llvm/MC/MCAsmLayout.h | |
parent | b861d48f798bc772be99df66d40727c80d3da1dd (diff) | |
download | llvm-593cb79eb5517d821248ba0698f35e0a6e65b6e4.tar.gz llvm-593cb79eb5517d821248ba0698f35e0a6e65b6e4.tar.bz2 llvm-593cb79eb5517d821248ba0698f35e0a6e65b6e4.tar.xz |
Provide a version of getSymbolOffset that returns false on error.
This simplifies ELFObjectWriter::SymbolValue a bit more. This new version
will also be used in the COFF writer to fix pr19147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAsmLayout.h')
-rw-r--r-- | include/llvm/MC/MCAsmLayout.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmLayout.h b/include/llvm/MC/MCAsmLayout.h index 3058b7b487..d942e273a4 100644 --- a/include/llvm/MC/MCAsmLayout.h +++ b/include/llvm/MC/MCAsmLayout.h @@ -102,6 +102,10 @@ public: /// \brief Get the offset of the given symbol, as computed in the current /// layout. + /// \result True on success. + bool getSymbolOffset(const MCSymbolData *SD, uint64_t &Val) const; + + /// \brief Variant that reports a fatal error if the offset is not computable. uint64_t getSymbolOffset(const MCSymbolData *SD) const; /// @} |