<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 10, 2014 at 4:55 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">On Fri, Mar 28, 2014 at 12:27 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dexonsmith<br>
Date: Fri Mar 28 14:27:37 2014<br>
New Revision: 205037<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=205037&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=205037&view=rev</a><br>
Log:<br>
Use constexpr again, this time portably<br>
<br>
Responding to Justin's review of r205025.<br>
<br>
Modified:<br>
cfe/trunk/lib/CodeGen/CodeGenPGO.cpp<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.cpp?rev=205037&r1=205036&r2=205037&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.cpp?rev=205037&r1=205036&r2=205037&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenPGO.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Fri Mar 28 14:27:37 2014<br>
@@ -815,8 +815,8 @@ namespace {<br>
}<br>
<br>
static void emitRuntimeHook(CodeGenModule &CGM) {<br>
- const char *RuntimeVarName = "__llvm_profile_runtime";<br>
- const char *RuntimeUserName = "__llvm_profile_runtime_user";<br>
+ LLVM_CONSTEXPR const char *RuntimeVarName = "__llvm_profile_runtime";<br>
+ LLVM_CONSTEXPR const char *RuntimeUserName = "__llvm_profile_runtime_user";<br></blockquote><div><br></div></div><div>constexpr seems like overkill here. I think what you really want is just</div><div><br></div>
<div>
const char *const RuntimeBlah = "...";</div></div></div></div></blockquote><div><br></div><div>Out of curiosity, is that preferable over `const char RuntimeBlah[] = "...";`? If so, why?</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>(that'll do the right thing regardless of constexpr support).</div>
</div></div></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>