mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1459617: Merge upstream webrtc fix for build bustage with clang trunk. r=dminor
https://webrtc.googlesource.com/src/+/bda78c9464f4d0e6ff26b0035624a967269c3b0a
This commit is contained in:
parent
976282cb1f
commit
4ac65c8eef
@ -15,7 +15,7 @@ namespace optional_internal {
|
||||
|
||||
#if RTC_HAS_ASAN
|
||||
|
||||
void* FunctionThatDoesNothingImpl(void* x) { return x; }
|
||||
const void* FunctionThatDoesNothingImpl(const void* x) { return x; }
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -26,18 +26,18 @@ namespace optional_internal {
|
||||
#if RTC_HAS_ASAN
|
||||
|
||||
// This is a non-inlined function. The optimizer can't see inside it.
|
||||
void* FunctionThatDoesNothingImpl(void*);
|
||||
const void* FunctionThatDoesNothingImpl(const void*);
|
||||
|
||||
template <typename T>
|
||||
inline T* FunctionThatDoesNothing(T* x) {
|
||||
return reinterpret_cast<T*>(
|
||||
FunctionThatDoesNothingImpl(reinterpret_cast<void*>(x)));
|
||||
inline const T* FunctionThatDoesNothing(T* x) {
|
||||
return reinterpret_cast<const T*>(
|
||||
FunctionThatDoesNothingImpl(reinterpret_cast<const void*>(x)));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template <typename T>
|
||||
inline T* FunctionThatDoesNothing(T* x) { return x; }
|
||||
inline const T* FunctionThatDoesNothing(T* x) { return x; }
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user