diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-09 13:24:38 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-09 13:24:38 +0000 |
commit | 7504c283f2f76d697c68474a459d895c2f6b0b83 (patch) | |
tree | f8279e0195f7cc33bdf8450484f402ab49a3dc92 /llvm/lib/Target/TargetAsmInfo.cpp | |
parent | e1a65bcda17231de21a741a9ab34795fb5cb446d (diff) | |
download | bcm5719-llvm-7504c283f2f76d697c68474a459d895c2f6b0b83.tar.gz bcm5719-llvm-7504c283f2f76d697c68474a459d895c2f6b0b83.zip |
Fix thinko
llvm-svn: 53309
Diffstat (limited to 'llvm/lib/Target/TargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetAsmInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index 6d2f6437bb0..35099f58548 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -167,7 +167,6 @@ TargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const { bool isThreadLocal = GVar->isThreadLocal(); assert(GVar && "Invalid global value for section selection"); - SectionKind::Kind kind; if (isSuitableForBSS(GVar)) { // Variable can be easily put to BSS section. return (isThreadLocal ? SectionKind::ThreadBSS : SectionKind::BSS); @@ -177,14 +176,14 @@ TargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const { // note, there is no thread-local r/o section. Constant *C = GVar->getInitializer(); if (C->ContainsRelocations()) - kind = SectionKind::ROData; + return SectionKind::ROData; else { const ConstantArray *CVA = dyn_cast<ConstantArray>(C); // Check, if initializer is a null-terminated string if (CVA && CVA->isCString()) - kind = SectionKind::RODataMergeStr; + return SectionKind::RODataMergeStr; else - kind = SectionKind::RODataMergeConst; + return SectionKind::RODataMergeConst; } } |