summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-04-30 21:51:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-04-30 21:51:13 +0000
commitfee224f942b707d855e97f8b0f1e31c70667d7ee (patch)
tree4b3fd8ad4dd60a157595f0239e57ef20d07c2034 /llvm/include
parentc74503ea21a415f43f51f878085613581419f673 (diff)
downloadbcm5719-llvm-fee224f942b707d855e97f8b0f1e31c70667d7ee.tar.gz
bcm5719-llvm-fee224f942b707d855e97f8b0f1e31c70667d7ee.zip
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. llvm-svn: 207711
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/MC/MCAsmLayout.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/MC/MCAsmLayout.h b/llvm/include/llvm/MC/MCAsmLayout.h
index 3058b7b4874..d942e273a4c 100644
--- a/llvm/include/llvm/MC/MCAsmLayout.h
+++ b/llvm/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;
/// @}
OpenPOWER on IntegriCloud