diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-31 20:52:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-31 20:52:39 +0000 |
commit | 26630c1180502d07c9b2b4a9a4ba06bc5ddf180b (patch) | |
tree | 29c36c86ec272ac013e35f333ae760fc558b941e /include/llvm/Target/TargetLoweringObjectFile.h | |
parent | cc726599ae7d44ad962696f523eb91675d338b96 (diff) | |
download | external_llvm-26630c1180502d07c9b2b4a9a4ba06bc5ddf180b.zip external_llvm-26630c1180502d07c9b2b4a9a4ba06bc5ddf180b.tar.gz external_llvm-26630c1180502d07c9b2b4a9a4ba06bc5ddf180b.tar.bz2 |
move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
indicate that it is a predicate, not an emitter. This eliminates TAI
dependencies on Mangler and GlobalValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r-- | include/llvm/Target/TargetLoweringObjectFile.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index feecaac..868b274 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -259,6 +259,13 @@ public: const MCSection *getTextSection() const { return TextSection; } const MCSection *getDataSection() const { return DataSection; } + /// shouldEmitUsedDirectiveFor - This hook allows targets to selectively + /// decide not to emit the UsedDirective for some symbols in llvm.used. + /// FIXME: REMOVE this (rdar://7071300) + virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, + Mangler *) const { + return (GV!=0); + } /// getSectionForMergeableConstant - Given a mergeable constant with the /// specified size and relocation information, return a section that it @@ -368,6 +375,12 @@ public: virtual const MCSection * getSectionForMergeableConstant(SectionKind Kind) const; + + /// shouldEmitUsedDirectiveFor - This hook allows targets to selectively + /// decide not to emit the UsedDirective for some symbols in llvm.used. + /// FIXME: REMOVE this (rdar://7071300) + virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, + Mangler *) const; }; |