NFC: deduplicate isRepeatedBytePattern from clang to LLVM's isBytewiseValue
authorJF Bastien <jfbastien@apple.com>
Fri, 21 Sep 2018 13:54:09 +0000 (13:54 +0000)
committerJF Bastien <jfbastien@apple.com>
Fri, 21 Sep 2018 13:54:09 +0000 (13:54 +0000)
commit2f0582fcc73f231d60e8e10c1af5ad5a1891457c
treeb1365de21c5f628b87a2fd1a57c5fb02e6d52260
parentaf2c73e13d351d92de07a1f849ba9f87906722ad
NFC: deduplicate isRepeatedBytePattern from clang to LLVM's isBytewiseValue

Summary:
This code was in CGDecl.cpp and really belongs in LLVM. It happened to have isBytewiseValue which served a very similar purpose but wasn't as powerful as clang's version. Remove the clang version, and augment isBytewiseValue to be as powerful so that clang does the same thing it used to.

LLVM part of this patch: D51751

Subscribers: dexonsmith, cfe-commits

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

llvm-svn: 342734
clang/lib/CodeGen/CGDecl.cpp