<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 20, 2016 at 3:43 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">majnemer added a subscriber: majnemer.<br>
<br>
================<br>
Comment at: lib/DebugInfo/PDB/Raw/SymbolStream.cpp:57<br>
@@ +56,3 @@<br>
+<br>
+static StringRef makeStringRef(char *p) { return {p, strlen(p)}; }<br>
+<br>
----------------<br>
Why not make this `const char *` ?  Then you could use the implicit constructor to make a `StringRef`.<br></blockquote><div><br></div><div>Or, we can return `reinterpret_cast<DataSym32 *>(Buf.data())->name` from `getSymbolName`.</div><div><br></div><div>(I originally thought that StringRef might have a constructor `template <size_t N> StringRef(const char (&Str)[N])` to avoid computing the length of a fixed size string at runtime, but seems that it doesn't have such constructor, so it should work.)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Also, variable names should be capitalized.<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D20480" rel="noreferrer">http://reviews.llvm.org/D20480</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>