This fixes libLLVM.so ABI mismatches between llvm compiled with clang
and llvm compiled with gcc (PR39427).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks. There's a bit of unused code that passes isPodLike through the layers, but this is the minimal fix. Looks good to me.
Comment Actions
Hmm. This makes Optional<int> non-trivial, which is a serious semantic problem for certain uses of the type (e.g. putting it in a union); it's not just an optimization. Obviously those were unportable because of the #if, but we should really fix this. There's no way that GCC just generically miscompiles all partial specializations.
llvm/trunk/include/llvm/ADT/Optional.h | ||
---|---|---|
121 | I wonder if GCC's problem is that we haven't formally created an object of type T at this address, and the assignment isn't good enough We could just placement-new here; you're allowed to just replace objects like that when the destructor is trivial. |
I wonder if GCC's problem is that we haven't formally created an object of type T at this address, and the assignment isn't good enough We could just placement-new here; you're allowed to just replace objects like that when the destructor is trivial.