[compiler-rt] r292253 - [scudo] Eliminate the runtime dependency on libc++abi
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 12:41:04 PST 2017
Author: phosek
Date: Tue Jan 17 14:41:04 2017
New Revision: 292253
URL: http://llvm.org/viewvc/llvm-project?rev=292253&view=rev
Log:
[scudo] Eliminate the runtime dependency on libc++abi
Making this variable non-static avoids the need for locking to ensure
that the initialization is thread-safe which in turns eliminates the
runtime dependency on libc++abi library (for __cxa_guard_acquire and
__cxa_guard_release) which makes it possible to link scudo against
pure C programs.
Differential Revision: https://reviews.llvm.org/D28757
Modified:
compiler-rt/trunk/lib/scudo/scudo_utils.cpp
Modified: compiler-rt/trunk/lib/scudo/scudo_utils.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_utils.cpp?rev=292253&r1=292252&r2=292253&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_utils.cpp (original)
+++ compiler-rt/trunk/lib/scudo/scudo_utils.cpp Tue Jan 17 14:41:04 2017
@@ -87,7 +87,7 @@ CPUIDRegs getCPUFeatures() {
bool testCPUFeature(CPUFeature Feature)
{
- static CPUIDRegs FeaturesRegs = getCPUFeatures();
+ CPUIDRegs FeaturesRegs = getCPUFeatures();
switch (Feature) {
case CRC32CPUFeature: // CRC32 is provided by SSE 4.2.
More information about the llvm-commits
mailing list