[llvm] r208383 - printCustom is only used in PseudoSourceValue, remove it from Value.

Alp Toker alp at nuanti.com
Thu May 8 18:54:14 PDT 2014


PR889 has some useful background relating to this commit, referencing 
here posterity.

Alp.


On 09/05/2014 01:49, Nick Lewycky wrote:
> Author: nicholas
> Date: Thu May  8 19:49:03 2014
> New Revision: 208383
>
> URL: http://llvm.org/viewvc/llvm-project?rev=208383&view=rev
> Log:
> printCustom is only used in PseudoSourceValue, remove it from Value.
>
> Modified:
>      llvm/trunk/include/llvm/IR/Value.h
>      llvm/trunk/lib/IR/AsmWriter.cpp
>
> Modified: llvm/trunk/include/llvm/IR/Value.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Value.h?rev=208383&r1=208382&r2=208383&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Value.h (original)
> +++ llvm/trunk/include/llvm/IR/Value.h Thu May  8 19:49:03 2014
> @@ -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();
>
> Modified: llvm/trunk/lib/IR/AsmWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=208383&r1=208382&r2=208383&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/AsmWriter.cpp (original)
> +++ llvm/trunk/lib/IR/AsmWriter.cpp Thu May  8 19:49:03 2014
> @@ -2206,9 +2206,7 @@ void Value::print(raw_ostream &ROS) cons
>                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 &
>     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'; }
>   
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-- 
http://www.nuanti.com
the browser experts




More information about the llvm-commits mailing list