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 | ed5f2e504efe8aa7ab8d1297bfd7ccffc369b868 (patch) | |
tree | c29df44cf3e5ba8e25c22ad51f58ced9a7f55a96 /llvm/lib/Transforms/IPO/GlobalOpt.cpp | |
parent | 540f9536c825eee867171c6071a187a8916255f8 (diff) | |
download | bcm5719-llvm-ed5f2e504efe8aa7ab8d1297bfd7ccffc369b868.tar.gz bcm5719-llvm-ed5f2e504efe8aa7ab8d1297bfd7ccffc369b868.zip |
Try to unbreak selfhost.
llvm-svn: 123537
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalOpt.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 07fe1b802e6..c1f66b772af 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/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)); |