mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-29 13:18:23 +00:00
Move most user of TargetMachine::getDataLayout to the Module one
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. This patch is quite boring overall, except for some uglyness in ASMPrinter which has a getDataLayout function but has some clients that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so some methods are taking a DataLayout as parameter. Reviewers: echristo Subscribers: yaron.keren, rafael, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D11090 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -257,7 +257,7 @@ public:
|
||||
const MCExpr *lowerConstant(const Constant *CV);
|
||||
|
||||
/// \brief Print a general LLVM constant to the .s file.
|
||||
void EmitGlobalConstant(const Constant *CV);
|
||||
void EmitGlobalConstant(const DataLayout &DL, const Constant *CV);
|
||||
|
||||
/// \brief Unnamed constant global variables solely contaning a pointer to
|
||||
/// another globals variable act like a global variable "proxy", or GOT
|
||||
@@ -320,7 +320,9 @@ public:
|
||||
|
||||
/// Targets can override this to change how global constants that are part of
|
||||
/// a C++ static/global constructor list are emitted.
|
||||
virtual void EmitXXStructor(const Constant *CV) { EmitGlobalConstant(CV); }
|
||||
virtual void EmitXXStructor(const DataLayout &DL, const Constant *CV) {
|
||||
EmitGlobalConstant(DL, CV);
|
||||
}
|
||||
|
||||
/// Return true if the basic block has exactly one predecessor and the control
|
||||
/// transfer mechanism between the predecessor and this block is a
|
||||
@@ -535,7 +537,8 @@ private:
|
||||
void EmitLLVMUsedList(const ConstantArray *InitList);
|
||||
/// Emit llvm.ident metadata in an '.ident' directive.
|
||||
void EmitModuleIdents(Module &M);
|
||||
void EmitXXStructorList(const Constant *List, bool isCtor);
|
||||
void EmitXXStructorList(const DataLayout &DL, const Constant *List,
|
||||
bool isCtor);
|
||||
GCMetadataPrinter *GetOrCreateGCPrinter(GCStrategy &C);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user