Clean up bionic_macros.h a bit.
Use <android-base/macros.h> instead where possible, and move the bionic
macros out of the way of the libbase ones. Yes, there are folks who manage
to end up with both included at once (thanks OpenGL!), and cleaning that
up doesn't seem nearly as practical as just making this change.
Bug: N/A
Test: builds
Change-Id: I23fc544f39d5addf81dc61471771a5438778895b
diff --git a/libc/malloc_debug/DebugData.h b/libc/malloc_debug/DebugData.h
index f7cf8ab..3a36299 100644
--- a/libc/malloc_debug/DebugData.h
+++ b/libc/malloc_debug/DebugData.h
@@ -94,7 +94,7 @@
Config config_;
- DISALLOW_COPY_AND_ASSIGN(DebugData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(DebugData);
};
extern DebugData* g_debug;
diff --git a/libc/malloc_debug/GuardData.h b/libc/malloc_debug/GuardData.h
index 7b21671..b6ec889 100644
--- a/libc/malloc_debug/GuardData.h
+++ b/libc/malloc_debug/GuardData.h
@@ -56,7 +56,7 @@
virtual const char* GetTypeName() = 0;
- DISALLOW_COPY_AND_ASSIGN(GuardData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(GuardData);
};
class FrontGuardData : public GuardData {
@@ -75,7 +75,7 @@
size_t offset_ = 0;
- DISALLOW_COPY_AND_ASSIGN(FrontGuardData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(FrontGuardData);
};
class RearGuardData : public GuardData {
@@ -90,5 +90,5 @@
private:
const char* GetTypeName() override { return "REAR"; }
- DISALLOW_COPY_AND_ASSIGN(RearGuardData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(RearGuardData);
};
diff --git a/libc/malloc_debug/MapData.h b/libc/malloc_debug/MapData.h
index d8398bd..b9b697c 100644
--- a/libc/malloc_debug/MapData.h
+++ b/libc/malloc_debug/MapData.h
@@ -68,5 +68,5 @@
std::mutex m_;
std::set<MapEntry*, compare_entries> entries_;
- DISALLOW_COPY_AND_ASSIGN(MapData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(MapData);
};
diff --git a/libc/malloc_debug/OptionData.h b/libc/malloc_debug/OptionData.h
index 3fa8e14..8fb13a4 100644
--- a/libc/malloc_debug/OptionData.h
+++ b/libc/malloc_debug/OptionData.h
@@ -39,5 +39,5 @@
protected:
DebugData* debug_;
- DISALLOW_COPY_AND_ASSIGN(OptionData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(OptionData);
};
diff --git a/libc/malloc_debug/PointerData.h b/libc/malloc_debug/PointerData.h
index 62d4186..b05a763 100644
--- a/libc/malloc_debug/PointerData.h
+++ b/libc/malloc_debug/PointerData.h
@@ -184,5 +184,5 @@
static std::mutex free_pointer_mutex_;
static std::deque<FreePointerInfoType> free_pointers_;
- DISALLOW_COPY_AND_ASSIGN(PointerData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(PointerData);
};
diff --git a/libc/malloc_debug/RecordData.h b/libc/malloc_debug/RecordData.h
index 3e5ca02..a015882 100644
--- a/libc/malloc_debug/RecordData.h
+++ b/libc/malloc_debug/RecordData.h
@@ -49,7 +49,7 @@
pid_t tid_;
private:
- DISALLOW_COPY_AND_ASSIGN(RecordEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(RecordEntry);
};
class ThreadCompleteEntry : public RecordEntry {
@@ -60,7 +60,7 @@
std::string GetString() const override;
private:
- DISALLOW_COPY_AND_ASSIGN(ThreadCompleteEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(ThreadCompleteEntry);
};
class AllocEntry : public RecordEntry {
@@ -72,7 +72,7 @@
void* pointer_;
private:
- DISALLOW_COPY_AND_ASSIGN(AllocEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(AllocEntry);
};
class MallocEntry : public AllocEntry {
@@ -86,7 +86,7 @@
size_t size_;
private:
- DISALLOW_COPY_AND_ASSIGN(MallocEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(MallocEntry);
};
class FreeEntry : public AllocEntry {
@@ -97,7 +97,7 @@
std::string GetString() const override;
private:
- DISALLOW_COPY_AND_ASSIGN(FreeEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(FreeEntry);
};
class CallocEntry : public MallocEntry {
@@ -111,7 +111,7 @@
size_t nmemb_;
private:
- DISALLOW_COPY_AND_ASSIGN(CallocEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(CallocEntry);
};
class ReallocEntry : public MallocEntry {
@@ -125,7 +125,7 @@
void* old_pointer_;
private:
- DISALLOW_COPY_AND_ASSIGN(ReallocEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(ReallocEntry);
};
// aligned_alloc, posix_memalign, memalign, pvalloc, valloc all recorded with this class.
@@ -140,7 +140,7 @@
size_t alignment_;
private:
- DISALLOW_COPY_AND_ASSIGN(MemalignEntry);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(MemalignEntry);
};
class Config;
@@ -170,5 +170,5 @@
std::atomic_bool dump_;
std::string dump_file_;
- DISALLOW_COPY_AND_ASSIGN(RecordData);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(RecordData);
};
diff --git a/libc/malloc_debug/debug_disable.h b/libc/malloc_debug/debug_disable.h
index 0049595..f9c3149 100644
--- a/libc/malloc_debug/debug_disable.h
+++ b/libc/malloc_debug/debug_disable.h
@@ -57,5 +57,5 @@
private:
bool disabled_;
- DISALLOW_COPY_AND_ASSIGN(ScopedDisableDebugCalls);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(ScopedDisableDebugCalls);
};