[llvm] 78bac7f - [MC] Remove unneeded getMemtagAttr()
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 10:57:04 PST 2025
Author: Fangrui Song
Date: 2025-02-23T10:56:59-08:00
New Revision: 78bac7f0a6757880b9d43e0e3030ff4c0f669bc4
URL: https://github.com/llvm/llvm-project/commit/78bac7f0a6757880b9d43e0e3030ff4c0f669bc4
DIFF: https://github.com/llvm/llvm-project/commit/78bac7f0a6757880b9d43e0e3030ff4c0f669bc4.diff
LOG: [MC] Remove unneeded getMemtagAttr()
Added:
Modified:
llvm/include/llvm/MC/MCAsmInfo.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCAsmInfo.h b/llvm/include/llvm/MC/MCAsmInfo.h
index f4de106860d35..87eefdd41b011 100644
--- a/llvm/include/llvm/MC/MCAsmInfo.h
+++ b/llvm/include/llvm/MC/MCAsmInfo.h
@@ -356,8 +356,6 @@ class MCAsmInfo {
/// protected visibility. Defaults to MCSA_Protected
MCSymbolAttr ProtectedVisibilityAttr = MCSA_Protected;
- MCSymbolAttr MemtagAttr = MCSA_Memtag;
-
//===--- Dwarf Emission Directives -----------------------------------===//
/// True if target supports emission of debugging information. Defaults to
@@ -635,8 +633,6 @@ class MCAsmInfo {
return ProtectedVisibilityAttr;
}
- MCSymbolAttr getMemtagAttr() const { return MemtagAttr; }
-
bool doesSupportDebugInformation() const { return SupportsDebugInformation; }
ExceptionHandling getExceptionHandlingType() const { return ExceptionsType; }
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index cbc28196632f2..3c4280333e76d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -760,7 +760,7 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
OutContext.reportError(SMLoc(),
"tagged symbols (-fsanitize=memtag-globals) are "
"only supported on AArch64 Android");
- OutStreamer->emitSymbolAttribute(EmittedSym, MAI->getMemtagAttr());
+ OutStreamer->emitSymbolAttribute(EmittedSym, MCSA_Memtag);
}
if (!GV->hasInitializer()) // External globals require no extra code.
More information about the llvm-commits
mailing list