diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-24 18:42:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-24 18:42:53 +0000 |
commit | f20f250b6f1b3d4c873c4f6fa368a6ab5ace39b7 (patch) | |
tree | a38900ed14644ff5c0294eceda1ece6fed7fe2a0 /lib/Target/TargetAsmInfo.cpp | |
parent | 7420ab2191432494c780dd659a3053096d6cfe53 (diff) | |
download | external_llvm-f20f250b6f1b3d4c873c4f6fa368a6ab5ace39b7.zip external_llvm-f20f250b6f1b3d4c873c4f6fa368a6ab5ace39b7.tar.gz external_llvm-f20f250b6f1b3d4c873c4f6fa368a6ab5ace39b7.tar.bz2 |
we already know the sectionkind when invoking SelectSectionForGlobal,
pass it in instead of recomputing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index 1ed9a71..9893bf9 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -300,14 +300,13 @@ const Section *TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const { } // Use default section depending on the 'type' of global - return SelectSectionForGlobal(GV); + return SelectSectionForGlobal(GV, Kind); } // Lame default implementation. Calculate the section name for global. const Section* -TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const { - SectionKind::Kind Kind = SectionKindForGlobal(GV); - +TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, + SectionKind::Kind Kind) const { if (Kind == SectionKind::Text) return getTextSection(); |