diff options
author | Diego Caballero <diego.caballero@intel.com> | 2018-05-21 22:12:38 +0000 |
---|---|---|
committer | Diego Caballero <diego.caballero@intel.com> | 2018-05-21 22:12:38 +0000 |
commit | 1bd5f2261df498ef17bd25c10b594394ac39ca5d (patch) | |
tree | bd8b03dc7c075d4eaf05a5a161dedd7a46dc6bf0 /llvm/lib/Transforms | |
parent | 9efb77e25f5c6f5ebf3ab6c1259c50cc6031fd6f (diff) | |
download | bcm5719-llvm-1bd5f2261df498ef17bd25c10b594394ac39ca5d.tar.gz bcm5719-llvm-1bd5f2261df498ef17bd25c10b594394ac39ca5d.zip |
Fix warning from r332654 with LLVM_ATTRIBUTE_USED
r332654 tried to fix an unused function warning with
a void cast. This approach worked for clang and gcc
but not for MSVC. This commit replaces the void cast
with the LLVM_ATTRIBUTE_USED approach.
llvm-svn: 332910
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp index f8e8f759f83..59a11f23baf 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp @@ -26,7 +26,8 @@ static cl::opt<bool> EnableHCFGVerifier("vplan-verify-hcfg", cl::init(false), /// Utility function that checks whether \p VPBlockVec has duplicate /// VPBlockBases. -static bool hasDuplicates(const SmallVectorImpl<VPBlockBase *> &VPBlockVec) { +LLVM_ATTRIBUTE_USED static bool +hasDuplicates(const SmallVectorImpl<VPBlockBase *> &VPBlockVec) { SmallDenseSet<const VPBlockBase *, 8> VPBlockSet; for (const auto *Block : VPBlockVec) { if (VPBlockSet.count(Block)) @@ -52,7 +53,6 @@ static void verifyBlocksInRegion(const VPRegionBlock *Region) { // TODO: This won't work for switch statements. assert(!hasDuplicates(Successors) && "Multiple instances of the same successor."); - (void)hasDuplicates; for (const VPBlockBase *Succ : Successors) { // There must be a bi-directional link between block and successor. |