Changes imported from Abseil "staging" branch:
- 5b675ef65e4977b3ac778a75a21e99db1ebe78e7 Remove "not an official google project" disclaimer. by Abseil Team <absl-team@google.com> - 77d2aacc03efe6841612b38bcbb745dde1ad7d3e Avoid weak virtual table warnings (-Wweak-vtables) and re... by Abseil Team <absl-team@google.com> GitOrigin-RevId: 5b675ef65e4977b3ac778a75a21e99db1ebe78e7 Change-Id: Ia0d1d6e39169c7ad9783d25dc92dad041de3a966
This commit is contained in:
		
							parent
							
								
									dedb4eec6c
								
							
						
					
					
						commit
						0fece732a2
					
				
					 3 changed files with 11 additions and 7 deletions
				
			
		| 
						 | 
					@ -84,7 +84,3 @@ For more information about Abseil:
 | 
				
			||||||
* Peruse our
 | 
					* Peruse our
 | 
				
			||||||
  [Abseil Compatibility Guarantees](http://abseil.io/about/compatibility) to
 | 
					  [Abseil Compatibility Guarantees](http://abseil.io/about/compatibility) to
 | 
				
			||||||
  understand both what we promise to you, and what we expect of you in return.
 | 
					  understand both what we promise to you, and what we expect of you in return.
 | 
				
			||||||
 | 
					 | 
				
			||||||
## Disclaimer
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
*   This is not an official Google product.
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,13 @@ namespace base_internal {
 | 
				
			||||||
SysAllocator::~SysAllocator() {}
 | 
					SysAllocator::~SysAllocator() {}
 | 
				
			||||||
void SysAllocator::GetStats(char* buffer, int) { buffer[0] = 0; }
 | 
					void SysAllocator::GetStats(char* buffer, int) { buffer[0] = 0; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Dummy key method to avoid weak vtable.
 | 
				
			||||||
 | 
					void MallocExtensionWriter::UnusedKeyMethod() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void StringMallocExtensionWriter::Write(const char* buf, int len) {
 | 
				
			||||||
 | 
					  out_->append(buf, len);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Default implementation -- does nothing
 | 
					// Default implementation -- does nothing
 | 
				
			||||||
MallocExtension::~MallocExtension() { }
 | 
					MallocExtension::~MallocExtension() { }
 | 
				
			||||||
bool MallocExtension::VerifyAllMemory() { return true; }
 | 
					bool MallocExtension::VerifyAllMemory() { return true; }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -388,6 +388,9 @@ class MallocExtensionWriter {
 | 
				
			||||||
  MallocExtensionWriter() {}
 | 
					  MallocExtensionWriter() {}
 | 
				
			||||||
  MallocExtensionWriter(const MallocExtensionWriter&) = delete;
 | 
					  MallocExtensionWriter(const MallocExtensionWriter&) = delete;
 | 
				
			||||||
  MallocExtensionWriter& operator=(const MallocExtensionWriter&) = delete;
 | 
					  MallocExtensionWriter& operator=(const MallocExtensionWriter&) = delete;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 private:
 | 
				
			||||||
 | 
					  virtual void UnusedKeyMethod();  // Dummy key method to avoid weak vtable.
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// A subclass that writes to the std::string "out".  NOTE: The generated
 | 
					// A subclass that writes to the std::string "out".  NOTE: The generated
 | 
				
			||||||
| 
						 | 
					@ -396,9 +399,7 @@ class MallocExtensionWriter {
 | 
				
			||||||
class StringMallocExtensionWriter : public MallocExtensionWriter {
 | 
					class StringMallocExtensionWriter : public MallocExtensionWriter {
 | 
				
			||||||
 public:
 | 
					 public:
 | 
				
			||||||
  explicit StringMallocExtensionWriter(std::string* out) : out_(out) {}
 | 
					  explicit StringMallocExtensionWriter(std::string* out) : out_(out) {}
 | 
				
			||||||
  virtual void Write(const char* buf, int len) {
 | 
					  void Write(const char* buf, int len) override;
 | 
				
			||||||
    out_->append(buf, len);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 private:
 | 
					 private:
 | 
				
			||||||
  std::string* const out_;
 | 
					  std::string* const out_;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue