1 //===--- SymbolLocation.cpp --------------------------------------*- C++-*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "SymbolLocation.h"
14 constexpr uint32_t SymbolLocation::Position::MaxLine
;
15 constexpr uint32_t SymbolLocation::Position::MaxColumn
;
17 void SymbolLocation::Position::setLine(uint32_t L
) {
20 LineColumnPacked
= (L
<< ColumnBits
) | column();
22 void SymbolLocation::Position::setColumn(uint32_t Col
) {
25 LineColumnPacked
= (LineColumnPacked
& ~MaxColumn
) | Col
;
28 llvm::raw_ostream
&operator<<(llvm::raw_ostream
&OS
, const SymbolLocation
&L
) {
30 return OS
<< "(none)";
31 return OS
<< L
.FileURI
<< "[" << L
.Start
.line() << ":" << L
.Start
.column()
32 << "-" << L
.End
.line() << ":" << L
.End
.column() << ")";