-void Argument::print(std::ostream &o) const {
- WriteAsOperand(o, this, true, getParent() ? getParent()->getParent() : 0);
-}
-
-// Value::dump - allow easy printing of Values from the debugger.
-// Located here because so much of the needed functionality is here.
-void Value::dump() const { print(*cerr.stream()); cerr << '\n'; }
-
-// Type::dump - allow easy printing of Values from the debugger.
-// Located here because so much of the needed functionality is here.
-void Type::dump() const { print(*cerr.stream()); cerr << '\n'; }
-
-void
-ParamAttrsList::dump() const {
- cerr << "PAL[ ";
- for (unsigned i = 0; i < attrs.size(); ++i) {
- uint16_t index = getParamIndex(i);
- uint16_t attrs = getParamAttrs(index);
- cerr << "{" << index << "," << attrs << "} ";
- }
- cerr << "]\n";
-}
-
-//===----------------------------------------------------------------------===//
-// SlotMachine Implementation
-//===----------------------------------------------------------------------===//
-
-#if 0
-#define SC_DEBUG(X) cerr << X
-#else
-#define SC_DEBUG(X)
-#endif
-
-// Module level constructor. Causes the contents of the Module (sans functions)
-// to be added to the slot table.
-SlotMachine::SlotMachine(const Module *M)
- : TheModule(M) ///< Saved for lazy initialization.
- , TheFunction(0)
- , FunctionProcessed(false)
- , mMap(), mNext(0), fMap(), fNext(0)
-{
-}
-
-// Function level constructor. Causes the contents of the Module and the one
-// function provided to be added to the slot table.
-SlotMachine::SlotMachine(const Function *F)
- : TheModule(F ? F->getParent() : 0) ///< Saved for lazy initialization
- , TheFunction(F) ///< Saved for lazy initialization
- , FunctionProcessed(false)
- , mMap(), mNext(0), fMap(), fNext(0)
-{
-}
-
-inline void SlotMachine::initialize() {
- if (TheModule) {
- processModule();
- TheModule = 0; ///< Prevent re-processing next time we're called.