aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLoweringObjectFile.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-01 21:46:23 +0000
committerChris Lattner <sabre@nondot.org>2009-08-01 21:46:23 +0000
commitf9650c061ee89ac55740555530ca5c2842c28738 (patch)
treef4d06798f109db00ab27ab23f3f0ca8995d6bc2b /include/llvm/Target/TargetLoweringObjectFile.h
parent27602b82c2a12b9f99c1f7fcbfb4be5ba97dbd7d (diff)
it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h40
1 files changed, 6 insertions, 34 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 8727aefc6e..2b2d52fc6e 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -26,35 +26,7 @@ namespace llvm {
class Mangler;
class TargetMachine;
-
-/// SectionInfo - This class is a target-independent classification of a global
-/// which is used to simplify target-specific code by exposing common
-/// predicates.
-class SectionInfo : public SectionKind {
- /// Weak - This is true if the referenced symbol is weak (i.e. linkonce,
- /// weak, weak_odr, etc). This is orthogonal from the categorization.
- bool Weak : 1;
-
-public:
-
- /// Weak - This is true if the referenced symbol is weak (i.e. linkonce,
- /// weak, weak_odr, etc). This is orthogonal from the categorization.
- bool isWeak() const { return Weak; }
-
- static SectionInfo get(Kind K, bool isWeak = false) {
- SectionInfo Res;
- Res.K = K;
- Res.Weak = isWeak;
- return Res;
- }
- static SectionInfo get(SectionKind K, bool isWeak = false) {
- SectionInfo Res;
- *(SectionKind*)&Res = K;
- Res.Weak = isWeak;
- return Res;
- }
-};
-
+
class TargetLoweringObjectFile {
MCContext *Ctx;
protected:
@@ -146,7 +118,7 @@ public:
/// getFlagsForNamedSection.
virtual const MCSection *
getSpecialCasedSectionGlobals(const GlobalValue *GV, Mangler *Mang,
- SectionInfo Kind) const {
+ SectionKind Kind) const {
return 0;
}
@@ -159,7 +131,7 @@ public:
protected:
virtual const MCSection *
- SelectSectionForGlobal(const GlobalValue *GV, SectionInfo Kind,
+ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const;
};
@@ -192,7 +164,7 @@ public:
SmallVectorImpl<char> &Str) const;
virtual const MCSection *
- SelectSectionForGlobal(const GlobalValue *GV, SectionInfo Kind,
+ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const;
protected:
const MCSection *DataRelSection;
@@ -221,7 +193,7 @@ public:
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
virtual const MCSection *
- SelectSectionForGlobal(const GlobalValue *GV, SectionInfo Kind,
+ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const;
virtual const MCSection *
@@ -244,7 +216,7 @@ public:
SmallVectorImpl<char> &Str) const;
virtual const MCSection *
- SelectSectionForGlobal(const GlobalValue *GV, SectionInfo Kind,
+ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const;
};