diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-22 00:05:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-22 00:05:44 +0000 |
commit | 4565ef5b65b7d0b778b41836d70b806196cc8e24 (patch) | |
tree | 6938ad8daf6bcadd6914dcc163a1ebb7ac57d678 /llvm/lib/Target/TargetAsmInfo.cpp | |
parent | 71dfd782ce8b4523ae1200011074d1cea02978bd (diff) | |
download | bcm5719-llvm-4565ef5b65b7d0b778b41836d70b806196cc8e24.tar.gz bcm5719-llvm-4565ef5b65b7d0b778b41836d70b806196cc8e24.zip |
reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler
to use API. It still should not be part of libvmcore, but
is better than it was. Also teach it to be smart about
hidden visibility.
llvm-svn: 76700
Diffstat (limited to 'llvm/lib/Target/TargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetAsmInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index 580c3fe4db0..96814fee4c9 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -202,13 +202,13 @@ TargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const { if (isSuitableForBSS(GVar)) { // Variable can be easily put to BSS section. - return (isThreadLocal ? SectionKind::ThreadBSS : SectionKind::BSS); + return isThreadLocal ? SectionKind::ThreadBSS : SectionKind::BSS; } else if (GVar->isConstant() && !isThreadLocal) { // Now we know, that variable has initializer and it is constant. We need to // check its initializer to decide, which section to output it into. Also // note, there is no thread-local r/o section. Constant *C = GVar->getInitializer(); - if (C->ContainsRelocations(Reloc::LocalOrGlobal)) { + if (C->getRelocationInfo() != 0) { // Decide whether it is still possible to put symbol into r/o section. if (TM.getRelocationModel() != Reloc::Static) return SectionKind::Data; |