aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2016-05-10 17:44:46 +0000
committerDerek Schuff <dschuff@google.com>2016-05-10 17:44:46 +0000
commitcc42df4a3024d9785ac17867db0b3af5f25285e9 (patch)
tree638320ce8d011f20a3b48c6f04f25b455a0c3fce /clang/unittests/Basic/VirtualFileSystemTest.cpp
parent8cc3b37d2c1bd54ee3677c537940298b45dd3d52 (diff)
downloadllvm-cc42df4a3024d9785ac17867db0b3af5f25285e9.zip
llvm-cc42df4a3024d9785ac17867db0b3af5f25285e9.tar.gz
llvm-cc42df4a3024d9785ac17867db0b3af5f25285e9.tar.bz2
Do not register incompatible C++ destructors with __cxa_atexit
Summary: For a static object with a nontrivial destructor, clang generates an initializer function (__cxx_global_var_init) which registers that object's destructor using __cxa_atexit. However some ABIs (ARM, WebAssembly) use destructors that return 'this' instead of having void return (which does not match the signature of function pointers passed to __cxa_atexit). This results in undefined behavior when the destructors are called. All the calling conventions I know of on ARM can tolerate this, but WebAssembly requires the signatures of indirect calls to match the called function. This patch disables that direct registration of destructors for ABIs that have this-returning destructors. Subscribers: aemerson, jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D19275 llvm-svn: 269085
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions