[PATCH] D24812: Lit C++11 Compatibility Patch #11

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 15 14:15:28 PST 2017


rnk added inline comments.


================
Comment at: test/CodeGenCXX/static-init.cpp:14
+// CHECK98: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" zeroinitializer, comdat, align 8
+// CHECK11: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global { i8** } { i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5test49HasVTableE, i32 0, inrange i32 0, i32 2) }, comdat, align 8
 
----------------
rjmccall wrote:
> Interesting.  It looks to me like the C++11 IR pattern is actually the only one that would've exposed the bug that Reid was fixing in r242704.  Reid, do you agree?
I'm not sure I follow exactly, but I think what's going on here is that, in C++11, the implicit default constructor is constexpr. I'm not sure how that feeds into what type we choose to use for the global.


https://reviews.llvm.org/D24812





More information about the cfe-commits mailing list