Skip to content

Commit 46000da

Browse files
committed
[NFC][LLVM][Support] Misc code cleanup in ScopedPrinter
- Use character instead of a single character string. - Add missing header to ScopedPrinter.cpp and adjust the code to conform to LLVM coding standards.
1 parent 9f7e7f7 commit 46000da

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

llvm/lib/Support/ScopedPrinter.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
#include "llvm/Support/ScopedPrinter.h"
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// Implementation of ScopedPrinter.
10+
//
11+
//===----------------------------------------------------------------------===//
212

13+
#include "llvm/Support/ScopedPrinter.h"
314
#include "llvm/Support/Format.h"
415

16+
using namespace llvm;
517
using namespace llvm::support;
618

7-
namespace llvm {
8-
9-
raw_ostream &operator<<(raw_ostream &OS, const HexNumber &Value) {
19+
raw_ostream &llvm::operator<<(raw_ostream &OS, const HexNumber &Value) {
1020
OS << "0x" << utohexstr(Value.Value);
1121
return OS;
1222
}
@@ -45,5 +55,3 @@ JSONScopedPrinter::JSONScopedPrinter(
4555
if (this->OuterScope)
4656
this->OuterScope->setPrinter(*this);
4757
}
48-
49-
} // namespace llvm

0 commit comments

Comments
 (0)