[llvm-commits] CVS: llvm/include/llvm/Constant.h Constants.h Module.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 13 22:31:00 PDT 2002
Changes in directory llvm/include/llvm:
Constant.h updated: 1.5 -> 1.6
Constants.h updated: 1.17 -> 1.18
Module.h updated: 1.26 -> 1.27
---
Log message:
- Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)
---
Diffs of the changes:
Index: llvm/include/llvm/Constant.h
diff -u llvm/include/llvm/Constant.h:1.5 llvm/include/llvm/Constant.h:1.6
--- llvm/include/llvm/Constant.h:1.5 Wed Oct 9 18:12:22 2002
+++ llvm/include/llvm/Constant.h Sun Oct 13 22:30:13 2002
@@ -79,7 +79,7 @@
// WARNING: Only to be used by Bytecode & Assembly Parsers! USER CODE SHOULD
// NOT USE THIS!!
// Returns the number of uses of OldV that were replaced.
- virtual unsigned mutateReferences(Value* OldV, Value *NewV) { return 0; }
+ unsigned mutateReferences(Value* OldV, Value *NewV);
// END WARNING!!
};
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.17 llvm/include/llvm/Constants.h:1.18
--- llvm/include/llvm/Constants.h:1.17 Wed Oct 9 18:12:22 2002
+++ llvm/include/llvm/Constants.h Sun Oct 13 22:30:13 2002
@@ -439,12 +439,6 @@
static inline bool classof(const Value *V) {
return isa<ConstantPointer>(V) && classof(cast<ConstantPointer>(V));
}
-
- // WARNING: Only to be used by Bytecode & Assembly Parsers! USER CODE SHOULD
- // NOT USE THIS!!
- // Returns the number of uses of OldV that were replaced.
- virtual unsigned mutateReferences(Value* OldV, Value *NewV);
- // END WARNING!!
};
@@ -502,14 +496,6 @@
static inline bool classof(const Value *V) {
return isa<Constant>(V) && classof(cast<Constant>(V));
}
-
-public:
- // WARNING: Only to be used by Bytecode & Assembly Parsers! USER CODE SHOULD
- // NOT USE THIS!!
- // Returns the number of uses of OldV that were replaced.
- virtual unsigned mutateReferences(Value* OldV, Value *NewV);
- // END WARNING!!
};
-
#endif
Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.26 llvm/include/llvm/Module.h:1.27
--- llvm/include/llvm/Module.h:1.26 Sun Aug 25 17:54:55 2002
+++ llvm/include/llvm/Module.h Sun Oct 13 22:30:13 2002
@@ -59,7 +59,8 @@
SymbolTable *SymTab;
// Accessor for the underlying GlobalValRefMap... only through the
- // ConstantPointerRef class...
+ // Constant class...
+ friend class Constant;
friend class ConstantPointerRef;
void mutateConstantPointerRef(GlobalValue *OldGV, GlobalValue *NewGV);
ConstantPointerRef *getConstantPointerRef(GlobalValue *GV);
More information about the llvm-commits
mailing list