diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-03-26 22:46:27 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-03-26 22:46:27 +0000 |
commit | fbcf23c3c12449c264f1448a2eee524be0b799f7 (patch) | |
tree | dd62fcdbb882dbeb0a4a18ecee422da54234ab60 /lib/VMCore | |
parent | 98e0410f078185d54195d2594be3cb96e6e8ab5d (diff) | |
download | external_llvm-fbcf23c3c12449c264f1448a2eee524be0b799f7.zip external_llvm-fbcf23c3c12449c264f1448a2eee524be0b799f7.tar.gz external_llvm-fbcf23c3c12449c264f1448a2eee524be0b799f7.tar.bz2 |
Bullet proof against undefined args produced by upgrading ols-style debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/IntrinsicInst.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp index 8bdb944..2c2c5a9 100644 --- a/lib/VMCore/IntrinsicInst.cpp +++ b/lib/VMCore/IntrinsicInst.cpp @@ -45,13 +45,13 @@ static Value *CastOperand(Value *C) { Value *DbgInfoIntrinsic::StripCast(Value *C) { if (Value *CO = CastOperand(C)) { - return StripCast(CO); + C = StripCast(CO); } else if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) { if (GV->hasInitializer()) if (Value *CO = CastOperand(GV->getInitializer())) - return StripCast(CO); + C = StripCast(CO); } - return C; + return dyn_cast<GlobalVariable>(C); } //===----------------------------------------------------------------------===// |