diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-12-08 17:34:50 +0000 |
| commit | 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e (patch) | |
| tree | 62f873df87c7c675557a179e0c4c83fe9f3087bc /contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp | |
| parent | cf037972ea8863e2bab7461d77345367d2c1e054 (diff) | |
| parent | 7fa27ce4a07f19b07799a767fc29416f3b625afb (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp b/contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp index 11274a7fcc16..0290a819e5de 100644 --- a/contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp +++ b/contrib/llvm-project/llvm/lib/Object/ModuleSymbolTable.cpp @@ -17,7 +17,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Triple.h" #include "llvm/IR/Function.h" #include "llvm/IR/GlobalAlias.h" #include "llvm/IR/GlobalValue.h" @@ -42,6 +41,7 @@ #include "llvm/Support/SMLoc.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/Triple.h" #include <algorithm> #include <cassert> #include <cstdint> @@ -174,12 +174,12 @@ void ModuleSymbolTable::CollectAsmSymvers( } void ModuleSymbolTable::printSymbolName(raw_ostream &OS, Symbol S) const { - if (S.is<AsmSymbol *>()) { - OS << S.get<AsmSymbol *>()->first; + if (isa<AsmSymbol *>(S)) { + OS << cast<AsmSymbol *>(S)->first; return; } - auto *GV = S.get<GlobalValue *>(); + auto *GV = cast<GlobalValue *>(S); if (GV->hasDLLImportStorageClass()) OS << "__imp_"; @@ -187,10 +187,10 @@ void ModuleSymbolTable::printSymbolName(raw_ostream &OS, Symbol S) const { } uint32_t ModuleSymbolTable::getSymbolFlags(Symbol S) const { - if (S.is<AsmSymbol *>()) - return S.get<AsmSymbol *>()->second; + if (isa<AsmSymbol *>(S)) + return cast<AsmSymbol *>(S)->second; - auto *GV = S.get<GlobalValue *>(); + auto *GV = cast<GlobalValue *>(S); uint32_t Res = BasicSymbolRef::SF_None; if (GV->isDeclarationForLinker()) |
