From bfa3b905822800c804ab55a7a2e7367b473d5504 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 15 Jan 2011 11:25:34 +0000 Subject: [PATCH] Try to unbreak selfhost. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123537 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/GlobalOpt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 07fe1b802e6..c1f66b772af 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -2169,6 +2169,7 @@ static bool isSimpleEnoughPointerToCommit(Constant *C) { // and we know how to evaluate it by moving the bitcast from the pointer // operand to the value operand. } else if (CE->getOpcode() == Instruction::BitCast && + isa(CE->getOperand(0)) && CE->getType()->isPointerTy() && CE->getOperand(0)->getType()->isPointerTy()) { GlobalVariable *GV = cast(CE->getOperand(0)); -- 2.11.0