[lld] r227551 - Remove useless DEBUG_WITH_TYPE.

Nick Kledzik kledzik at apple.com
Thu Jan 29 19:34:32 PST 2015


On Jan 29, 2015, at 6:15 PM, Rui Ueyama <ruiu at google.com> wrote:

> Author: ruiu
> Date: Thu Jan 29 20:15:57 2015
> New Revision: 227551
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=227551&view=rev
> Log:
> Remove useless DEBUG_WITH_TYPE.
> 
> We have a DEBUG_TYPE macro for the same debug string already
> at the beginning of the file.
> 
> Modified:
>    lld/trunk/lib/Passes/RoundTripNativePass.cpp
>    lld/trunk/lib/Passes/RoundTripYAMLPass.cpp
> 
> Modified: lld/trunk/lib/Passes/RoundTripNativePass.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/RoundTripNativePass.cpp?rev=227551&r1=227550&r2=227551&view=diff
> ==============================================================================
> --- lld/trunk/lib/Passes/RoundTripNativePass.cpp (original)
> +++ lld/trunk/lib/Passes/RoundTripNativePass.cpp Thu Jan 29 20:15:57 2015
> @@ -28,9 +28,7 @@ void RoundTripNativePass::perform(std::u
>   StringRef outFile = llvm::sys::path::filename(_context.outputPath());
>   if (llvm::sys::fs::createTemporaryFile(outFile, "native", tmpNativeFile))
>     return;
> -  DEBUG_WITH_TYPE("RoundTripNativePass", {
> -    llvm::dbgs() << "RoundTripNativePass: " << tmpNativeFile << "\n";
> -  });
> +  llvm::dbgs() << "RoundTripNativePass: " << tmpNativeFile << "\n”;
I thought you still had to wrap the output statement with DEBUG() ?

-Nick

> 
>   // The file that is written would be kept around if there is a problem
>   // writing to the file or when reading atoms back from the file.
> 
> Modified: lld/trunk/lib/Passes/RoundTripYAMLPass.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/RoundTripYAMLPass.cpp?rev=227551&r1=227550&r2=227551&view=diff
> ==============================================================================
> --- lld/trunk/lib/Passes/RoundTripYAMLPass.cpp (original)
> +++ lld/trunk/lib/Passes/RoundTripYAMLPass.cpp Thu Jan 29 20:15:57 2015
> @@ -28,9 +28,7 @@ void RoundTripYAMLPass::perform(std::uni
>   StringRef outFile = llvm::sys::path::filename(_context.outputPath());
>   if (llvm::sys::fs::createTemporaryFile(outFile, "yaml", tmpYAMLFile))
>     return;
> -  DEBUG_WITH_TYPE("RoundTripYAMLPass", {
> -    llvm::dbgs() << "RoundTripYAMLPass: " << tmpYAMLFile << "\n";
> -  });
> +  llvm::dbgs() << "RoundTripYAMLPass: " << tmpYAMLFile << "\n";
> 
>   // The file that is written would be kept around if there is a problem
>   // writing to the file or when reading atoms back from the file.
> 
> 
> _______________________________________________
> 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