summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-02 17:25:46 +0000
committerChris Lattner <sabre@nondot.org>2003-06-02 17:25:46 +0000
commit7fa6783a011167cdaf6fd47d31421e7bd871f4b8 (patch)
tree147b5e76138c6d10b45215d8d727de23a2dc75e6
parent92d2086df3d5e3f4f8b3f1b6c6a4432bbf852162 (diff)
downloadbcm5719-llvm-7fa6783a011167cdaf6fd47d31421e7bd871f4b8.tar.gz
bcm5719-llvm-7fa6783a011167cdaf6fd47d31421e7bd871f4b8.zip
Fix bug: Linker/2003-06-02-TypeResolveProblem.ll
llvm-svn: 6542
-rw-r--r--llvm/lib/VMCore/Constants.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 8fa5342ff3b..5c2f73e0017 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -556,6 +556,7 @@ void ConstantArray::destroyConstant() {
void ConstantArray::refineAbstractType(const DerivedType *OldTy,
const Type *NewTy) {
Value::refineAbstractType(OldTy, NewTy);
+ if (OldTy == NewTy) return;
// Make everyone now use a constant of the new type...
std::vector<Constant*> C;
@@ -625,6 +626,7 @@ void ConstantStruct::destroyConstant() {
void ConstantStruct::refineAbstractType(const DerivedType *OldTy,
const Type *NewTy) {
Value::refineAbstractType(OldTy, NewTy);
+ if (OldTy == NewTy) return;
// Make everyone now use a constant of the new type...
std::vector<Constant*> C;
@@ -666,6 +668,7 @@ void ConstantPointerNull::destroyConstant() {
void ConstantPointerNull::refineAbstractType(const DerivedType *OldTy,
const Type *NewTy) {
Value::refineAbstractType(OldTy, NewTy);
+ if (OldTy == NewTy) return;
// Make everyone now use a constant of the new type...
if (NewTy != OldTy) {
@@ -798,6 +801,7 @@ void ConstantExpr::destroyConstant() {
void ConstantExpr::refineAbstractType(const DerivedType *OldTy,
const Type *NewTy) {
Value::refineAbstractType(OldTy, NewTy);
+ if (OldTy == NewTy) return;
// FIXME: These need to use a lower-level implementation method, because the
// ::get methods intuit the type of the result based on the types of the
OpenPOWER on IntegriCloud