<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 22, 2011, at 2:55 PM, Richard Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Tue, November 22, 2011 22:39, Chandler Carruth wrote:<br><blockquote type="cite">On Tue, Nov 22, 2011 at 2:30 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>>wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">The attached patch fixes the compound-literals-in-C++ extension to always<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">use static storage duration for file-scope compound literals, as per GCC's<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">documentation for this extension. Currently we only give them static storage<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> duration if the initializer in which they appear is a constant.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">OK to commit?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It's not clear to me why we need the helper function? Otherwise this looks<br></blockquote><blockquote type="cite">fine to me...<br></blockquote><br>In r145087. We need the helper function because class ConstExprEmitter is<br>defined in that .cpp file.<br></div></blockquote></div><br><div>Looks like this broke one of the clang buildbots:</div><div><br></div><div><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout" style="font-family: 'Courier New', courier, monotype; color: black; ">******************** TEST 'Clang :: CodeGenCXX/compound-literals.cpp' FAILED ********************Script:
--
/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin10-RA/clang-build/Release+Asserts/bin/clang -cc1 -internal-isystem /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin10-RA/clang-build/Release+Asserts/bin/../lib/clang/3.1/include -emit-llvm -o - /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin10-RA/clang.src/test/CodeGenCXX/compound-literals.cpp | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin10-RA/clang.src/test/CodeGenCXX/compound-literals.cpp
--
Exit Code: 1
Command Output (stderr):
--
/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-i386-darwin10-RA/clang.src/test/CodeGenCXX/compound-literals.cpp:44:11: error: expected string not found in input
// CHECK: store i32* getelementptr inbounds (%struct.Z* @.compoundliteral, i32 0, i32 0, i32 0), i32** @p, align 8
          ^
<stdin>:59:47: note: scanning from here
define internal void @__cxx_global_var_init() nounwind section "__TEXT,__StaticInit,regular,pure_instructions" {
                                              ^
<stdin>:61:2: note: possible intended match here
 store i32* getelementptr inbounds (%struct.Z* @.compoundliteral, i32 0, i32 0, i32 0), i32** @p, align 4
 ^
--

********************
</span></pre></div><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><br></font></div><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><br></font></div><div>Looks like it's a difference in alignment, but I'm not sure what it's supposed to be testing without looking closer.</div><div><br></div><div>-eric</div><div><font class="Apple-style-span" face="'Courier New', courier, monotype"><br></font></div></body></html>