<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 3, 2015 at 3:11 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">================<br>
Comment at: include/llvm/DebugInfo/PDB/IPDBRawSymbol.h:193<br>
@@ +192,3 @@<br>
+  virtual bool isVirtualInheritance() const = 0;<br>
+  virtual bool isVolatileType() const = 0;<br>
+};<br>
----------------<br>
dblaikie wrote:<br>
> How're these functions going to communicate failure?<br>
Undefined in theory, probably false in practice.  You shouldn't call methods on the raw interface unless you know it's a valid method.<br>
<br>
For the purposes of a dumper who wanted to detect unknown / unexpected fields, that knowledge could all be encapsulated in the implementation of the raw interface.  For example, you could have PDBSymbol::dump() which calls RawSymbol->dump(), and that particular implementation can go to the native API instead of calling the friendly accessors.<br></blockquote><div><br>Ah - that's a bit different from what I was thinking from our previous discussion.<br><br>If it's undefined behavior, then it might be appropriate to hide PDBRawSymbol from users entirely - they might as well be casting down to the specific type and using those functions instead, perhaps? (I was thinking clients would be able to use PDBRawSymbol and just call all the functions and swallow the failures when they would call the wrong functions)<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<a href="http://reviews.llvm.org/D7356" target="_blank">http://reviews.llvm.org/D7356</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>