summaryrefslogtreecommitdiff
path: root/lib/scudo
diff options
context:
space:
mode:
authorDavid L. Jones <dlj@google.com>2017-11-15 01:40:05 +0000
committerDavid L. Jones <dlj@google.com>2017-11-15 01:40:05 +0000
commit29961b5a9b00642c770ae522a336cf2cc6077398 (patch)
treed5d975f68cc9a5b4eaa8df4bca59c298988eaede /lib/scudo
parent5cdb7458cb1d6fc8fc83dd5a177658f1284f5d29 (diff)
parent65964b0190520f92123c3b1adb7dce481179909b (diff)
downloadcompiler-rt-google/testing.tar.gz
Creating branches/google/testing and tags/google/testing/2017-11-14 from r317716google/testing
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/google/testing@318248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo')
-rw-r--r--lib/scudo/scudo_allocator_secondary.h1
-rw-r--r--lib/scudo/scudo_crc32.h2
-rw-r--r--lib/scudo/scudo_utils.cpp6
-rw-r--r--lib/scudo/scudo_utils.h6
4 files changed, 6 insertions, 9 deletions
diff --git a/lib/scudo/scudo_allocator_secondary.h b/lib/scudo/scudo_allocator_secondary.h
index dbfb22565..5220b7c57 100644
--- a/lib/scudo/scudo_allocator_secondary.h
+++ b/lib/scudo/scudo_allocator_secondary.h
@@ -23,7 +23,6 @@
class ScudoLargeMmapAllocator {
public:
-
void Init() {
PageSize = GetPageSizeCached();
}
diff --git a/lib/scudo/scudo_crc32.h b/lib/scudo/scudo_crc32.h
index 5ffcc6265..e89e430f4 100644
--- a/lib/scudo/scudo_crc32.h
+++ b/lib/scudo/scudo_crc32.h
@@ -40,7 +40,7 @@ enum : u8 {
CRC32Hardware = 1,
};
-const static u32 CRC32Table[] = {
+static const u32 CRC32Table[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
diff --git a/lib/scudo/scudo_utils.cpp b/lib/scudo/scudo_utils.cpp
index 093eafe8e..653b6c8fa 100644
--- a/lib/scudo/scudo_utils.cpp
+++ b/lib/scudo/scudo_utils.cpp
@@ -90,8 +90,7 @@ typedef struct {
u32 Edx;
} CPUIDRegs;
-static void getCPUID(CPUIDRegs *Regs, u32 Level)
-{
+static void getCPUID(CPUIDRegs *Regs, u32 Level) {
__get_cpuid(Level, &Regs->Eax, &Regs->Ebx, &Regs->Ecx, &Regs->Edx);
}
@@ -118,8 +117,7 @@ CPUIDRegs getCPUFeatures() {
# define bit_SSE4_2 bit_SSE42 // clang and gcc have different defines.
# endif
-bool testCPUFeature(CPUFeature Feature)
-{
+bool testCPUFeature(CPUFeature Feature) {
CPUIDRegs FeaturesRegs = getCPUFeatures();
switch (Feature) {
diff --git a/lib/scudo/scudo_utils.h b/lib/scudo/scudo_utils.h
index 13269195b..cb7300db9 100644
--- a/lib/scudo/scudo_utils.h
+++ b/lib/scudo/scudo_utils.h
@@ -14,10 +14,10 @@
#ifndef SCUDO_UTILS_H_
#define SCUDO_UTILS_H_
-#include <string.h>
-
#include "sanitizer_common/sanitizer_common.h"
+#include <string.h>
+
namespace __scudo {
template <class Dest, class Source>
@@ -34,7 +34,7 @@ enum CPUFeature {
CRC32CPUFeature = 0,
MaxCPUFeature,
};
-bool testCPUFeature(CPUFeature feature);
+bool testCPUFeature(CPUFeature Feature);
INLINE u64 rotl(const u64 X, int K) {
return (X << K) | (X >> (64 - K));