diff options
author | Kristof Beyls <kristof.beyls@arm.com> | 2017-03-30 11:06:25 +0000 |
---|---|---|
committer | Kristof Beyls <kristof.beyls@arm.com> | 2017-03-30 11:06:25 +0000 |
commit | 7a76b315d6dfeed6791de5aa04ec1b8a6ba8ed19 (patch) | |
tree | aebbd34cd087ddb6894c94df3ba2f05e36f98926 /llvm/lib/Support | |
parent | 1ba115a113ec7ca2f6df0edad112b4479860de81 (diff) | |
download | bcm5719-llvm-7a76b315d6dfeed6791de5aa04ec1b8a6ba8ed19.tar.gz bcm5719-llvm-7a76b315d6dfeed6791de5aa04ec1b8a6ba8ed19.zip |
Revert "Make naming in Host.h in line with coding standards."
This reverts r299062, which caused build failures on Windows.
It also reverts the attempts to fix the windows builds in r299064 and r299065.
The introduction of namespace llvm::sys::detail makes MSVC, and seemingly also
mingw, complain about ambiguity with the existing namespace llvm::detail.
E.g.:
C:\b\slave\sanitizer-windows\llvm\include\llvm/Support/MathExtras.h(184): error C2872: 'detail': ambiguous symbol
C:\b\slave\sanitizer-windows\llvm\include\llvm/Support/PointerLikeTypeTraits.h(31): note: could be 'llvm::detail'
C:\b\slave\sanitizer-windows\llvm\include\llvm/Support/Host.h(80): note: or 'llvm::sys::detail'
In r299064 and r299065 I tried to fix these ambiguities, based on the errors
reported in the log files. It seems however that the build stops early when
this kind of error is encountered, and many build-then-fix-iterations on
Windows may be needed to fix this. Therefore reverting r299062 for now to
get the build working again on Windows.
llvm-svn: 299066
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Chrono.cpp | 12 | ||||
-rw-r--r-- | llvm/lib/Support/Host.cpp | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/Support/Chrono.cpp b/llvm/lib/Support/Chrono.cpp index daccaf1fc10..ca748f5c046 100644 --- a/llvm/lib/Support/Chrono.cpp +++ b/llvm/lib/Support/Chrono.cpp @@ -16,12 +16,12 @@ namespace llvm { using namespace sys; -const char llvm::detail::unit<std::ratio<3600>>::value[] = "h"; -const char llvm::detail::unit<std::ratio<60>>::value[] = "m"; -const char llvm::detail::unit<std::ratio<1>>::value[] = "s"; -const char llvm::detail::unit<std::milli>::value[] = "ms"; -const char llvm::detail::unit<std::micro>::value[] = "us"; -const char llvm::detail::unit<std::nano>::value[] = "ns"; +const char detail::unit<std::ratio<3600>>::value[] = "h"; +const char detail::unit<std::ratio<60>>::value[] = "m"; +const char detail::unit<std::ratio<1>>::value[] = "s"; +const char detail::unit<std::milli>::value[] = "ms"; +const char detail::unit<std::micro>::value[] = "us"; +const char detail::unit<std::nano>::value[] = "ns"; static inline struct tm getStructTM(TimePoint<> TP) { struct tm Storage; diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 54fbb558c43..230d0921184 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -64,7 +64,7 @@ static std::unique_ptr<llvm::MemoryBuffer> return std::move(*Text); } -StringRef sys::detail::getHostCPUNameForPowerPC( +StringRef sys::LinuxReadCpuInfo::getHostCPUName_powerpc( const StringRef &ProcCpuinfoContent) { // Access to the Processor Version Register (PVR) on PowerPC is privileged, // and so we must use an operating-system interface to determine the current @@ -144,7 +144,7 @@ StringRef sys::detail::getHostCPUNameForPowerPC( .Default(generic); } -StringRef sys::detail::getHostCPUNameForARM( +StringRef sys::LinuxReadCpuInfo::getHostCPUName_arm( const StringRef &ProcCpuinfoContent) { // The cpuid register on arm is not accessible from user space. On Linux, // it is exposed through the /proc/cpuinfo file. @@ -195,7 +195,7 @@ StringRef sys::detail::getHostCPUNameForARM( return "generic"; } -StringRef sys::detail::getHostCPUNameForS390x( +StringRef sys::LinuxReadCpuInfo::getHostCPUName_s390x( const StringRef &ProcCpuinfoContent) { // STIDP is a privileged operation, so use /proc/cpuinfo instead. @@ -1197,19 +1197,19 @@ StringRef sys::getHostCPUName() { StringRef sys::getHostCPUName() { std::unique_ptr<llvm::MemoryBuffer> P = getProcCpuinfoContent(); const StringRef& Content = P ? P->getBuffer() : ""; - return detail::getHostCPUNameForPowerPC(Content); + return LinuxReadCpuInfo::getHostCPUName_powerpc(Content); } #elif defined(__linux__) && defined(__arm__) StringRef sys::getHostCPUName() { std::unique_ptr<llvm::MemoryBuffer> P = getProcCpuinfoContent(); const StringRef& Content = P ? P->getBuffer() : ""; - return detail::getHostCPUNameForARM(Content); + return LinuxReadCpuInfo::getHostCPUName_arm(Content); } #elif defined(__linux__) && defined(__s390x__) StringRef sys::getHostCPUName() { std::unique_ptr<llvm::MemoryBuffer> P = getProcCpuinfoContent(); const StringRef& Content = P ? P->getBuffer() : ""; - return detail::getHostCPUNameForS390x(Content); + return LinuxReadCpuInfo::getHostCPUName_s390x(Content); } #else StringRef sys::getHostCPUName() { return "generic"; } |