aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLoweringObjectFile.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-05 04:25:40 +0000
committerChris Lattner <sabre@nondot.org>2009-08-05 04:25:40 +0000
commit58bed8fc29b6e55e7014dcb537808043c946cd73 (patch)
tree1105f0f6694657e181c276e4d701106099e3a1bb /include/llvm/Target/TargetLoweringObjectFile.h
parenta1b78d133e26f233ed2b0399846db2667e9a178e (diff)
expose SectionKindForGlobal to curious clients, named as
getKindForGlobal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 10ce48158a..630f9d0604 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -141,13 +141,27 @@ public:
return K;
}
+ /// getKindForGlobal - Classify the specified global variable into a set of
+ /// target independent categories embodied in SectionKind.
+ static SectionKind getKindForGlobal(const GlobalValue *GV,
+ const TargetMachine &TM);
+
/// SectionForGlobal - This method computes the appropriate section to emit
/// the specified global variable or function definition. This should not
/// be passed external (or available externally) globals.
const MCSection *SectionForGlobal(const GlobalValue *GV,
- Mangler *Mang,
+ SectionKind Kind, Mangler *Mang,
const TargetMachine &TM) const;
+ /// SectionForGlobal - This method computes the appropriate section to emit
+ /// the specified global variable or function definition. This should not
+ /// be passed external (or available externally) globals.
+ const MCSection *SectionForGlobal(const GlobalValue *GV,
+ Mangler *Mang,
+ const TargetMachine &TM) const {
+ return SectionForGlobal(GV, getKindForGlobal(GV, TM), Mang, TM);
+ }
+
/// getSpecialCasedSectionGlobals - Allow the target to completely override
/// section assignment of a global.
/// FIXME: ELIMINATE this by making PIC16 implement ADDRESS with