[llvm] r230700 - Remove DebugLoc::print(LLVMContext, raw_ostream), it was just

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Feb 27 00:32:11 PST 2015


> On 2015 Feb 26, at 15:32, Eric Christopher <echristo at gmail.com> wrote:
> 
> Author: echristo
> Date: Thu Feb 26 17:32:17 2015
> New Revision: 230700
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=230700&view=rev
> Log:
> Remove DebugLoc::print(LLVMContext, raw_ostream), it was just
> forwarding to the one that didn't take a context.

Thanks for the cleanup!  Most of DebugLoc's API doesn't really
make sense since MDLocation was created... it's on my list to
come back to.

> 
> Modified:
>    llvm/trunk/include/llvm/IR/DebugLoc.h
>    llvm/trunk/lib/CodeGen/MachineInstr.cpp
>    llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
> 
> Modified: llvm/trunk/include/llvm/IR/DebugLoc.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugLoc.h?rev=230700&r1=230699&r2=230700&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/DebugLoc.h (original)
> +++ llvm/trunk/include/llvm/IR/DebugLoc.h Thu Feb 26 17:32:17 2015
> @@ -103,7 +103,7 @@ namespace llvm {
>     void dump(const LLVMContext &) const { dump(); }
>     /// \brief prints source location /path/to/file.exe:line:col @[inlined at]
>     void print(raw_ostream &OS) const;
> -    void print(const LLVMContext &, raw_ostream &OS) const { print(OS); }
> +    //    void print(const LLVMContext &, raw_ostream &OS) const { print(OS); }
>   };
> 
> } // end namespace llvm
> 
> Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=230700&r1=230699&r2=230700&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
> +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Feb 26 17:32:17 2015
> @@ -1512,12 +1512,6 @@ void MachineInstr::dump() const {
> #endif
> }
> 
> -static void printDebugLoc(DebugLoc DL, const MachineFunction *MF,
> -                         raw_ostream &CommentOS) {
> -  const LLVMContext &Ctx = MF->getFunction()->getContext();
> -  DL.print(Ctx, CommentOS);
> -}
> -
> void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM,
>                          bool SkipOpers) const {
>   // We can be a bit tidier if we know the TargetMachine and/or MachineFunction.
> @@ -1738,7 +1732,7 @@ void MachineInstr::print(raw_ostream &OS
>       DebugLoc InlinedAtDL = DebugLoc::getFromDILocation(InlinedAt);
>       if (!InlinedAtDL.isUnknown() && MF) {
>         OS << " inlined @[ ";
> -        printDebugLoc(InlinedAtDL, MF, OS);
> +	InlinedAtDL.print(OS);
>         OS << " ]";
>       }
>     }
> @@ -1747,7 +1741,7 @@ void MachineInstr::print(raw_ostream &OS
>   } else if (!debugLoc.isUnknown() && MF) {
>     if (!HaveSemi) OS << ";";
>     OS << " dbg:";
> -    printDebugLoc(debugLoc, MF, OS);
> +    debugLoc.print(OS);
>   }
> 
>   OS << '\n';
> 
> Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=230700&r1=230699&r2=230700&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
> +++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Thu Feb 26 17:32:17 2015
> @@ -488,7 +488,7 @@ static std::string getDebugLocString(con
>     raw_string_ostream OS(Result);
>     const DebugLoc LoopDbgLoc = L->getStartLoc();
>     if (!LoopDbgLoc.isUnknown())
> -      LoopDbgLoc.print(L->getHeader()->getContext(), OS);
> +      LoopDbgLoc.print(OS);
>     else
>       // Just print the module name.
>       OS << L->getHeader()->getParent()->getParent()->getModuleIdentifier();
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list