diff options
Diffstat (limited to 'source/Utility/Log.cpp')
-rw-r--r-- | source/Utility/Log.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source/Utility/Log.cpp b/source/Utility/Log.cpp index 2e8570b762af..217b0d2ba97b 100644 --- a/source/Utility/Log.cpp +++ b/source/Utility/Log.cpp @@ -1,9 +1,8 @@ //===-- Log.cpp -------------------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -110,9 +109,7 @@ const Flags Log::GetMask() const { void Log::PutCString(const char *cstr) { Printf("%s", cstr); } void Log::PutString(llvm::StringRef str) { PutCString(str.str().c_str()); } -//---------------------------------------------------------------------- // Simple variable argument logging with flags. -//---------------------------------------------------------------------- void Log::Printf(const char *format, ...) { va_list args; va_start(args, format); @@ -120,11 +117,9 @@ void Log::Printf(const char *format, ...) { va_end(args); } -//---------------------------------------------------------------------- // All logging eventually boils down to this function call. If we have a // callback registered, then we call the logging callback. If we have a valid // file handle, we also log to the file. -//---------------------------------------------------------------------- void Log::VAPrintf(const char *format, va_list args) { llvm::SmallString<64> FinalMessage; llvm::raw_svector_ostream Stream(FinalMessage); @@ -138,9 +133,7 @@ void Log::VAPrintf(const char *format, va_list args) { WriteMessage(FinalMessage.str()); } -//---------------------------------------------------------------------- // Printing of errors that are not fatal. -//---------------------------------------------------------------------- void Log::Error(const char *format, ...) { va_list args; va_start(args, format); @@ -155,9 +148,7 @@ void Log::VAError(const char *format, va_list args) { Printf("error: %s", Content.c_str()); } -//---------------------------------------------------------------------- // Printing of warnings that are not fatal only if verbose mode is enabled. -//---------------------------------------------------------------------- void Log::Verbose(const char *format, ...) { if (!GetVerbose()) return; @@ -168,9 +159,7 @@ void Log::Verbose(const char *format, ...) { va_end(args); } -//---------------------------------------------------------------------- // Printing of warnings that are not fatal. -//---------------------------------------------------------------------- void Log::Warning(const char *format, ...) { llvm::SmallString<64> Content; va_list args; |