diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-01-15 11:25:34 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-01-15 11:25:34 +0000 |
commit | bfa3b905822800c804ab55a7a2e7367b473d5504 (patch) | |
tree | fcbc75d34e56eb9d08ef8864ef21140eaeee49e2 | |
parent | e8f8139429ffc41ae3a339d4a32e336a74f189c0 (diff) |
Try to unbreak selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123537 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 07fe1b802e..c1f66b772a 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<GlobalVariable>(CE->getOperand(0)) && CE->getType()->isPointerTy() && CE->getOperand(0)->getType()->isPointerTy()) { GlobalVariable *GV = cast<GlobalVariable>(CE->getOperand(0)); |