OSDN Git Service

CoroSplit: Squash unused variable FnTrigger warning in NDEBUG
authorGor Nishanov <GorNishanov@gmail.com>
Sat, 6 Aug 2016 21:11:10 +0000 (21:11 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Sat, 6 Aug 2016 21:11:10 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277938 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Coroutines/CoroSplit.cpp

index 570063d..c356f60 100644 (file)
@@ -31,8 +31,10 @@ using namespace llvm;
 // split.
 static void prepareForSplit(Function &F, CallGraph &CG) {
   Module &M = *F.getParent();
+#ifndef NDEBUG
   Function *DevirtFn = M.getFunction(CORO_DEVIRT_TRIGGER_FN);
   assert(DevirtFn && "coro.devirt.trigger function not found");
+#endif
 
   F.addFnAttr(CORO_PRESPLIT_ATTR, PREPARED_FOR_SPLIT);