[llvm] 89427bb - [NFC] Deprecate DataLayout::getPrefTypeAlignment
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 02:58:40 PST 2023
Author: Guillaume Chatelet
Date: 2023-01-24T10:58:22Z
New Revision: 89427bb7cbd104cd04be9dd75acf18f30d980e74
URL: https://github.com/llvm/llvm-project/commit/89427bb7cbd104cd04be9dd75acf18f30d980e74
DIFF: https://github.com/llvm/llvm-project/commit/89427bb7cbd104cd04be9dd75acf18f30d980e74.diff
LOG: [NFC] Deprecate DataLayout::getPrefTypeAlignment
Added:
Modified:
llvm/include/llvm/IR/DataLayout.h
llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DataLayout.h b/llvm/include/llvm/IR/DataLayout.h
index d6bfd213a387..fbfbf7732448 100644
--- a/llvm/include/llvm/IR/DataLayout.h
+++ b/llvm/include/llvm/IR/DataLayout.h
@@ -547,6 +547,7 @@ class DataLayout {
///
/// This is always at least as good as the ABI alignment.
/// FIXME: Deprecate this function once migration to Align is over.
+ LLVM_DEPRECATED("use getPrefTypeAlign instead", "getPrefTypeAlign")
uint64_t getPrefTypeAlignment(Type *Ty) const;
/// Returns the preferred stack/global alignment for the specified
diff --git a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
index 1c6e25607136..363ab0efdeb9 100644
--- a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
+++ b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
@@ -114,7 +114,7 @@ void XCoreAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
MCSymbol *GVSym = getSymbol(GV);
const Constant *C = GV->getInitializer();
- const Align Alignment(DL.getPrefTypeAlignment(C->getType()));
+ const Align Alignment = DL.getPrefTypeAlign(C->getType());
// Mark the start of the global
getTargetStreamer().emitCCTopData(GVSym->getName());
More information about the llvm-commits
mailing list