From: JF Bastien Date: Mon, 11 Apr 2016 23:03:54 +0000 (+0000) Subject: AtomicExpandPass: mark assert variable as used X-Git-Tag: llvmorg-3.9.0-rc1~9404 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3ac75f7488ba2c5f2f322e9e89380b5358b2002;p=platform%2Fupstream%2Fllvm.git AtomicExpandPass: mark assert variable as used Avoid -Wunused-variable llvm-svn: 266016 --- diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp index 3f84580..6d69de1 100644 --- a/llvm/lib/CodeGen/AtomicExpandPass.cpp +++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp @@ -1000,6 +1000,7 @@ void AtomicExpand::expandAtomicLoadToLibcall(LoadInst *I) { bool expanded = expandAtomicOpToLibcall( I, Size, Align, I->getPointerOperand(), nullptr, nullptr, I->getOrdering(), AtomicOrdering::NotAtomic, Libcalls); + (void)expanded; assert(expanded && "expandAtomicOpToLibcall shouldn't fail tor Load"); } @@ -1013,6 +1014,7 @@ void AtomicExpand::expandAtomicStoreToLibcall(StoreInst *I) { bool expanded = expandAtomicOpToLibcall( I, Size, Align, I->getPointerOperand(), I->getValueOperand(), nullptr, I->getOrdering(), AtomicOrdering::NotAtomic, Libcalls); + (void)expanded; assert(expanded && "expandAtomicOpToLibcall shouldn't fail tor Store"); } @@ -1028,6 +1030,7 @@ void AtomicExpand::expandAtomicCASToLibcall(AtomicCmpXchgInst *I) { I, Size, Align, I->getPointerOperand(), I->getNewValOperand(), I->getCompareOperand(), I->getSuccessOrdering(), I->getFailureOrdering(), Libcalls); + (void)expanded; assert(expanded && "expandAtomicOpToLibcall shouldn't fail tor CAS"); }