HomePhabricator

[sanitizer] Don't include <linux/user.h> in…

Authored by m.ostapenko on Apr 18 2017, 12:22 AM.

Description

[sanitizer] Don't include <linux/user.h> in sanitizer_stoptheworld_linux_libcdep.cc on ARM Android

Turned out that adding defined(_arm_) in sanitizer_stoptheworld_linux_libcdep.cc breaks android arm with some toolchains.

.../llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:36:11: fatal error:

'linux/user.h' file not found

include <linux/user.h> // for pt_regs

^

1 error generated.

Context:
#if SANITIZER_ANDROID && defined(arm)

include <linux/user.h> // for pt_regs

#else

This patch removes corresponding #if SANITIZER_ANDROID && defined(arm) and a bit rearranges adjacent сode.

Differential Revision: https://reviews.llvm.org/D32128

llvm-svn: 300531