[llvm] c4788bf - [NFC][LLVM][Support] Misc code cleanup in ScopedPrinter (#161462)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 13:58:31 PDT 2025


Author: Rahul Joshi
Date: 2025-10-01T13:58:26-07:00
New Revision: c4788bff8266497aafd526f887722982127a2e11

URL: https://github.com/llvm/llvm-project/commit/c4788bff8266497aafd526f887722982127a2e11
DIFF: https://github.com/llvm/llvm-project/commit/c4788bff8266497aafd526f887722982127a2e11.diff

LOG: [NFC][LLVM][Support] Misc code cleanup in ScopedPrinter (#161462)

Add missing file header to ScopedPrinter.cpp and adjust the code to
conform to LLVM coding standards.

Added: 
    

Modified: 
    llvm/lib/Support/ScopedPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/ScopedPrinter.cpp b/llvm/lib/Support/ScopedPrinter.cpp
index a17e397c0aa58..efb61785d17b0 100644
--- a/llvm/lib/Support/ScopedPrinter.cpp
+++ b/llvm/lib/Support/ScopedPrinter.cpp
@@ -1,12 +1,17 @@
-#include "llvm/Support/ScopedPrinter.h"
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
 
+#include "llvm/Support/ScopedPrinter.h"
 #include "llvm/Support/Format.h"
 
-using namespace llvm::support;
+using namespace llvm;
 
-namespace llvm {
-
-raw_ostream &operator<<(raw_ostream &OS, const HexNumber &Value) {
+raw_ostream &llvm::operator<<(raw_ostream &OS, const HexNumber &Value) {
   OS << "0x" << utohexstr(Value.Value);
   return OS;
 }
@@ -45,5 +50,3 @@ JSONScopedPrinter::JSONScopedPrinter(
   if (this->OuterScope)
     this->OuterScope->setPrinter(*this);
 }
-
-} // namespace llvm


        


More information about the llvm-commits mailing list