diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-07-31 17:51:05 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-07-31 17:51:05 +0000 |
commit | e9ad0c19bee72a0af954236b0b1a3c5b636f59ef (patch) | |
tree | 88c748a102483e7239f2f14689dbb4e1e80c847a /lib/ubsan/ubsan_init_standalone.cpp | |
parent | b65fe672e219ab25fa296b643d54a82653565d3f (diff) | |
download | compiler-rt-e9ad0c19bee72a0af954236b0b1a3c5b636f59ef.tar.gz |
compiler-rt: Rename .cc files in lib/ubsan to .cpp.
See https://reviews.llvm.org/D58620 for discussion, and for the commands
I ran. In addition I also ran
for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done
and manually updated references to renamed files found by that.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@367452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_init_standalone.cpp')
-rw-r--r-- | lib/ubsan/ubsan_init_standalone.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/ubsan/ubsan_init_standalone.cpp b/lib/ubsan/ubsan_init_standalone.cpp new file mode 100644 index 000000000..91c3f57b4 --- /dev/null +++ b/lib/ubsan/ubsan_init_standalone.cpp @@ -0,0 +1,33 @@ +//===-- ubsan_init_standalone.cpp -----------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Initialization of standalone UBSan runtime. +// +//===----------------------------------------------------------------------===// + +#include "ubsan_platform.h" +#if !CAN_SANITIZE_UB +# error "UBSan is not supported on this platform!" +#endif + +#include "sanitizer_common/sanitizer_internal_defs.h" +#include "ubsan_init.h" +#include "ubsan_signals_standalone.h" + +namespace __ubsan { + +class UbsanStandaloneInitializer { + public: + UbsanStandaloneInitializer() { + InitAsStandalone(); + InitializeDeadlySignals(); + } +}; +static UbsanStandaloneInitializer ubsan_standalone_initializer; + +} // namespace __ubsan |