From 9f47fb66370e5513bb9f737923e8cb476088acec Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 21 Nov 2011 19:42:56 +0000 Subject: Fix crasher in GVN due to my recent capture tracking changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145047 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/CaptureTracking.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Analysis/CaptureTracking.cpp') diff --git a/lib/Analysis/CaptureTracking.cpp b/lib/Analysis/CaptureTracking.cpp index 03bd70dfa3..9a7992e38d 100644 --- a/lib/Analysis/CaptureTracking.cpp +++ b/lib/Analysis/CaptureTracking.cpp @@ -53,6 +53,9 @@ namespace { /// counts as capturing it or not. bool llvm::PointerMayBeCaptured(const Value *V, bool ReturnCaptures, bool StoreCaptures) { + assert(!isa(V) && + "It doesn't make sense to ask whether a global is captured."); + // TODO: If StoreCaptures is not true, we could do Fancy analysis // to determine whether this store is not actually an escape point. // In that case, BasicAliasAnalysis should be updated as well to -- cgit v1.2.3