[llvm-commits] AddressSanitizer: Make GetOSVersion available on all platforms (issue 5702060)

samsonov at google.com samsonov at google.com
Wed Feb 29 13:04:49 PST 2012


http://codereview.appspot.com/5702060/diff/1/asan_interceptors.cc
File asan_interceptors.cc (right):

http://codereview.appspot.com/5702060/diff/1/asan_interceptors.cc#newcode623
asan_interceptors.cc:623: if (GetOSVersion() == MACOS_LION) {
On 2012/02/29 15:31:51, kcc1 wrote:
> Do you have any other reason for this function except for this if
statement?
Yes, it probably helps to flatten code, remove some ifdefs in favor of
ifs. I don't like the idea of OS-specific functions and headers (we
currently have asan_mac.h, we may get rid of it this way).

> For this statement, I would prefer something like
>    if (PlatformHasDifferentMemcpyAndMemmove)
I think we may end up with too much flags/functions of that kind.
if (PlatformNeedsGetPcSpBp)?


> BTW, Maybe it's better to implement internal_memcpy?
> (It will have to be highly performant)
Why do we need this? Not a problem, of course.

http://codereview.appspot.com/5702060/



More information about the llvm-commits mailing list