document some invariants.

llvm-svn: 77084
This commit is contained in:
Chris Lattner 2009-07-25 18:11:58 +00:00
parent 2de9510572
commit 7b5e51091e
2 changed files with 10 additions and 4 deletions

View File

@ -592,9 +592,10 @@ namespace llvm {
return 0;
}
/// SectionForGlobal - This hooks returns proper section name for given
/// global with all necessary flags and marks.
// FIXME: MOVE TO TARGETLOWERING.
/// 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.
// FIXME: MOVE TO ASMPRINTER.
const Section* SectionForGlobal(const GlobalValue *GV) const;
/// getSpecialCasedSectionGlobals - Allow the target to completely override

View File

@ -293,8 +293,13 @@ static SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV,
}
}
/// 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 Section *TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
assert(!GV->isDeclaration() && !GV->hasAvailableExternallyLinkage() &&
"Can only be used for global definitions");
SectionKind::Kind Kind = SectionKindForGlobal(GV, TM.getRelocationModel());
// Select section name.