From 3edf74fe29789044ce146f34ce6f79dfe390ab22 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Mon, 9 Feb 2015 23:02:10 +0000 Subject: [Statepoint] Improve two asserts, fix some style (NFC) Summary: It's important that our users immediately know what gc.safepoint_poll is. Also fix the style of the declaration of CreateGCStatepoint, in preparation for another change that will wrap it. Reviewers: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7517 llvm-svn: 228626 --- llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp index 517c4c95aa7..7b10d543736 100644 --- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp +++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp @@ -741,7 +741,8 @@ InsertSafepointPoll(DominatorTree &DT, Instruction *term, // different type inserted previously Function *F = dyn_cast(M->getOrInsertFunction("gc.safepoint_poll", ftype)); - assert(F && !F->empty() && "definition must exist"); + assert(F && "void @gc.safepoint_poll() must be defined"); + assert(!F->empty() && "gc.safepoint_poll must be a non-empty function"); CallInst *poll = CallInst::Create(F, "", term); // Record some information about the call site we're replacing -- cgit v1.2.3