mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Rename many DataLayout variables from TD to DL.
I am really sorry for the noise, but the current state where some parts of the code use TD (from the old name: TargetData) and other parts use DL makes it hard to write a patch that changes where those variables come from and how they are passed along. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201827 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,7 +51,7 @@ namespace {
|
||||
// alignment to a concrete value.
|
||||
unsigned getAlignment(GlobalVariable *GV) const;
|
||||
|
||||
const DataLayout *TD;
|
||||
const DataLayout *DL;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -89,20 +89,20 @@ static bool IsBetterCanonical(const GlobalVariable &A,
|
||||
}
|
||||
|
||||
bool ConstantMerge::hasKnownAlignment(GlobalVariable *GV) const {
|
||||
return TD || GV->getAlignment() != 0;
|
||||
return DL || GV->getAlignment() != 0;
|
||||
}
|
||||
|
||||
unsigned ConstantMerge::getAlignment(GlobalVariable *GV) const {
|
||||
unsigned Align = GV->getAlignment();
|
||||
if (Align)
|
||||
return Align;
|
||||
if (TD)
|
||||
return TD->getPreferredAlignment(GV);
|
||||
if (DL)
|
||||
return DL->getPreferredAlignment(GV);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool ConstantMerge::runOnModule(Module &M) {
|
||||
TD = getAnalysisIfAvailable<DataLayout>();
|
||||
DL = getAnalysisIfAvailable<DataLayout>();
|
||||
|
||||
// Find all the globals that are marked "used". These cannot be merged.
|
||||
SmallPtrSet<const GlobalValue*, 8> UsedGlobals;
|
||||
|
Reference in New Issue
Block a user