1 //===--- SymbolOrigin.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 "SymbolOrigin.h"
14 llvm::raw_ostream
&operator<<(llvm::raw_ostream
&OS
, SymbolOrigin O
) {
15 if (O
== SymbolOrigin::Unknown
)
16 return OS
<< "unknown";
17 constexpr static char Sigils
[] = "AOSMIRP7BL012345";
18 for (unsigned I
= 0; I
< sizeof(Sigils
); ++I
)
19 if (static_cast<uint16_t>(O
) & 1u << I
)