<div dir="ltr">I think it's about the same if it returns 0 or Optional<uint64_t> - the lack of an offset and offset 0 are basically the same thing, so far as I can tell. So it's not even like 0 is a special value, really.<br><br>George - reckon we could/should do this up at the caller instead, though? SectionRef does have queries for compressed, text, data, bss, virtual, bitcode - can we deduce allocated section from any of those, or worth adding it there?<br><br>I'm not too fussed/don't know well enough, but just throwing around some ideas. (Adrian? Duncan? Eric? *shrug*)<br><br>Eh - how about we go with what you've got for now. Can revisit it later if we want to.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 22, 2016 at 8:07 AM Adrian Prantl via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aprantl added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: ELF/GdbIndex.cpp:190<br class="gmail_msg">
+    return static_cast<const ELFSectionRef &>(Sec).getOffset();<br class="gmail_msg">
+  return 0;<br class="gmail_msg">
 }<br class="gmail_msg">
----------------<br class="gmail_msg">
Would returning an Optional<uint64_t> be better here?<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D28045" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28045</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>