<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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>constexpr seems like overkill here. I think what you really want is just</div><div><br></div><div>
const char *const RuntimeBlah = "...";</div><div><br></div><div>(that'll do the right thing regardless of constexpr support).</div></div></div></div>