printCustom is only used in PseudoSourceValue, remove it from Value.
authorNick Lewycky <nicholas@mxc.ca>
Fri, 9 May 2014 00:49:03 +0000 (00:49 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 9 May 2014 00:49:03 +0000 (00:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208383 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Value.h
lib/IR/AsmWriter.cpp

index d50525f6c33c315fb3986b9b3e8f6cf0bf83ea26..ad8ddc403d516d8c9a6d766a2473fe5795ea0862 100644 (file)
@@ -182,10 +182,6 @@ private:
   Value(const Value &) LLVM_DELETED_FUNCTION;
 
 protected:
-  /// printCustom - Value subclasses can override this to implement custom
-  /// printing behavior.
-  virtual void printCustom(raw_ostream &O) const;
-
   Value(Type *Ty, unsigned scid);
 public:
   virtual ~Value();
index 947e4fae41b6b8c5ea31e85e09de017fcb5292cf..3e716d13d3585904e0f8b9ed87f408eb5ffb6cbe 100644 (file)
@@ -2206,9 +2206,7 @@ void Value::print(raw_ostream &ROS) const {
              isa<Argument>(this)) {
     this->printAsOperand(OS);
   } else {
-    // Otherwise we don't know what it is. Call the virtual function to
-    // allow a subclass to print itself.
-    printCustom(OS);
+    llvm_unreachable("Unknown value to print out!");
   }
 }
 
@@ -2236,11 +2234,6 @@ void Value::printAsOperand(raw_ostream &O, bool PrintType, const Module *M) cons
   WriteAsOperandInternal(O, this, &TypePrinter, nullptr, M);
 }
 
-// Value::printCustom - subclasses should override this to implement printing.
-void Value::printCustom(raw_ostream &OS) const {
-  llvm_unreachable("Unknown value to print out!");
-}
-
 // Value::dump - allow easy printing of Values from the debugger.
 void Value::dump() const { print(dbgs()); dbgs() << '\n'; }