mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-20 03:17:48 +00:00
Start refactoring of asmprinters: provide a TAI hook, which will select a 'section kind' for a global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,8 +29,22 @@ namespace llvm {
|
||||
};
|
||||
}
|
||||
|
||||
namespace SectionKind {
|
||||
enum Kind {
|
||||
Text, ///< Text section
|
||||
Data, ///< Data section
|
||||
BSS, ///< BSS section
|
||||
ROData, ///< Readonly data section
|
||||
RODataMergeStr, ///< Readonly data section (mergeable strings)
|
||||
RODataMergeConst, ///< Readonly data section (mergeable constants)
|
||||
ThreadData, ///< Initialized TLS data objects
|
||||
ThreadBSS ///< Uninitialized TLS data objects
|
||||
};
|
||||
}
|
||||
|
||||
class TargetMachine;
|
||||
class CallInst;
|
||||
class GlobalValue;
|
||||
|
||||
/// TargetAsmInfo - This class is intended to be used as a base class for asm
|
||||
/// properties and features specific to the target.
|
||||
@@ -427,7 +441,11 @@ namespace llvm {
|
||||
/// if the symbol can be relocated.
|
||||
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
|
||||
bool Global) const;
|
||||
|
||||
|
||||
/// SectionKindForGlobal - This hook allows the target to select proper
|
||||
/// section kind used for global emission.
|
||||
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
|
||||
|
||||
// Accessors.
|
||||
//
|
||||
const char *getTextSection() const {
|
||||
@@ -642,7 +660,7 @@ namespace llvm {
|
||||
}
|
||||
const char *getDwarfSectionOffsetDirective() const {
|
||||
return DwarfSectionOffsetDirective;
|
||||
}
|
||||
}
|
||||
const char *getDwarfAbbrevSection() const {
|
||||
return DwarfAbbrevSection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user