aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-02-11 14:44:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-02-11 14:44:17 +0000
commit25d2c20c0c07075804f04bf5f6c742be0ca28b92 (patch)
tree19b8c3261c46b8f59bd1e546e7831f81d486d661 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentfa6607d0b6fe5dd45257491d83ffdd5d0f66a3bc (diff)
downloadllvm-25d2c20c0c07075804f04bf5f6c742be0ca28b92.zip
llvm-25d2c20c0c07075804f04bf5f6c742be0ca28b92.tar.gz
llvm-25d2c20c0c07075804f04bf5f6c742be0ca28b92.tar.bz2
Don't repeat name in comment and clang-format a function.
llvm-svn: 228831
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 35860fa..eac1245 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -224,21 +224,27 @@ const MCSection *TargetLoweringObjectFileELF::getExplicitSectionGlobal(
/*EntrySize=*/0, Group);
}
-/// getSectionPrefixForGlobal - Return the section prefix name used by options
-/// FunctionsSections and DataSections.
+/// Return the section prefix name used by options FunctionsSections and
+/// DataSections.
static StringRef getSectionPrefixForGlobal(SectionKind Kind) {
- if (Kind.isText()) return ".text.";
- if (Kind.isReadOnly()) return ".rodata.";
- if (Kind.isBSS()) return ".bss.";
-
- if (Kind.isThreadData()) return ".tdata.";
- if (Kind.isThreadBSS()) return ".tbss.";
-
- if (Kind.isDataNoRel()) return ".data.";
- if (Kind.isDataRelLocal()) return ".data.rel.local.";
- if (Kind.isDataRel()) return ".data.rel.";
- if (Kind.isReadOnlyWithRelLocal()) return ".data.rel.ro.local.";
-
+ if (Kind.isText())
+ return ".text.";
+ if (Kind.isReadOnly())
+ return ".rodata.";
+ if (Kind.isBSS())
+ return ".bss.";
+ if (Kind.isThreadData())
+ return ".tdata.";
+ if (Kind.isThreadBSS())
+ return ".tbss.";
+ if (Kind.isDataNoRel())
+ return ".data.";
+ if (Kind.isDataRelLocal())
+ return ".data.rel.local.";
+ if (Kind.isDataRel())
+ return ".data.rel.";
+ if (Kind.isReadOnlyWithRelLocal())
+ return ".data.rel.ro.local.";
assert(Kind.isReadOnlyWithRel() && "Unknown section kind");
return ".data.rel.ro.";
}