| 1 | //===- EntityLinkage.cpp --------------------------------------------------===// |
|---|---|
| 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 | #include "clang/ScalableStaticAnalysisFramework/Core/Model/EntityLinkage.h" |
| 10 | |
| 11 | #include "../ModelStringConversions.h" |
| 12 | |
| 13 | namespace clang::ssaf { |
| 14 | |
| 15 | bool EntityLinkage::operator==(const EntityLinkage &Other) const { |
| 16 | return Linkage == Other.Linkage; |
| 17 | } |
| 18 | |
| 19 | bool EntityLinkage::operator!=(const EntityLinkage &Other) const { |
| 20 | return !(*this == Other); |
| 21 | } |
| 22 | |
| 23 | llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, |
| 24 | EntityLinkageType Linkage) { |
| 25 | return OS << entityLinkageTypeToString(LT: Linkage); |
| 26 | } |
| 27 | |
| 28 | llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, |
| 29 | const EntityLinkage &Linkage) { |
| 30 | return OS << "EntityLinkage("<< Linkage.getLinkage() << ")"; |
| 31 | } |
| 32 | |
| 33 | } // namespace clang::ssaf |
| 34 |