Skip to content

Commit

Permalink
Cleanup the Arm64 CRC32 unused warning (facebook#5565)
Browse files Browse the repository at this point in the history
Summary:
When 'HAVE_ARM64_CRC' is set, the blew methods:

- bool rocksdb::crc32c::isSSE42()
- bool rocksdb::crc32c::isPCLMULQDQ()

are defined but not used, the unused-function is raised
when do rocksdb build.

This patch try to cleanup these warnings by add ifndef,
if it build under the HAVE_ARM64_CRC, we will not define
`isSSE42` and `isPCLMULQDQ`.
Pull Request resolved: facebook#5565

Differential Revision: D16233654

fbshipit-source-id: c32a9dda7465dbf65f9ccafef159124db92cdffd
  • Loading branch information
Yikun authored and darinpp committed Nov 13, 2019
1 parent 17cc147 commit a203d91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util/crc32c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ template __attribute__((target("sse4.2")))
uint32_t ExtendImpl<Fast_CRC32>(uint32_t, const char*, size_t);
#endif

// Detect if ARM64 CRC or not.
#ifndef HAVE_ARM64_CRC
// Detect if SS42 or not.
#ifndef HAVE_POWER8

Expand Down Expand Up @@ -442,6 +444,7 @@ static bool isPCLMULQDQ() {
}

#endif // HAVE_POWER8
#endif // HAVE_ARM64_CRC

typedef uint32_t (*Function)(uint32_t, const char*, size_t);

Expand Down

0 comments on commit a203d91

Please sign in to comment.