diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
| commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
| tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /llvm/lib/Object/ModuleSymbolTable.cpp | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
Diffstat (limited to 'llvm/lib/Object/ModuleSymbolTable.cpp')
| -rw-r--r-- | llvm/lib/Object/ModuleSymbolTable.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Object/ModuleSymbolTable.cpp b/llvm/lib/Object/ModuleSymbolTable.cpp index 11274a7fcc16..0290a819e5de 100644 --- a/llvm/lib/Object/ModuleSymbolTable.cpp +++ b/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()) |
