[llvm] 07153f7 - [llvm] Don't use LLVM_ATTRIBUTE_UNUSED for variables. NFC.
Marek Kurdej via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 01:12:28 PST 2022
Author: Marek Kurdej
Date: 2022-02-14T10:11:53+01:00
New Revision: 07153f7e072d86e374abfab22b71f9601643d175
URL: https://github.com/llvm/llvm-project/commit/07153f7e072d86e374abfab22b71f9601643d175
DIFF: https://github.com/llvm/llvm-project/commit/07153f7e072d86e374abfab22b71f9601643d175.diff
LOG: [llvm] Don't use LLVM_ATTRIBUTE_UNUSED for variables. NFC.
At least on MSVC, it does nothing and still causes a warning.
Added:
Modified:
llvm/include/llvm/ADT/GenericCycleImpl.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/GenericCycleImpl.h b/llvm/include/llvm/ADT/GenericCycleImpl.h
index d443f9e21a478..494b415cc2794 100644
--- a/llvm/include/llvm/ADT/GenericCycleImpl.h
+++ b/llvm/include/llvm/ADT/GenericCycleImpl.h
@@ -267,8 +267,8 @@ void GenericCycleInfoCompute<ContextT>::dfs(BlockT *EntryBlock) {
DFSTreeStack.emplace_back(TraverseStack.size());
llvm::append_range(TraverseStack, successors(Block));
- LLVM_ATTRIBUTE_UNUSED
bool Added = BlockDFSInfo.try_emplace(Block, ++Counter).second;
+ (void)Added;
assert(Added);
BlockPreorder.push_back(Block);
LLVM_DEBUG(errs() << " preorder number: " << Counter << "\n");
More information about the llvm-commits
mailing list