summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index f14ef36afb0..ebb174d39c6 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -821,19 +821,23 @@ bool LLParser::ParseSummaryEntry() {
if (!Index)
return SkipModuleSummaryEntry();
+ bool result = false;
switch (Lex.getKind()) {
case lltok::kw_gv:
- return ParseGVEntry(SummaryID);
+ result = ParseGVEntry(SummaryID);
+ break;
case lltok::kw_module:
- return ParseModuleEntry(SummaryID);
+ result = ParseModuleEntry(SummaryID);
+ break;
case lltok::kw_typeid:
- return ParseTypeIdEntry(SummaryID);
+ result = ParseTypeIdEntry(SummaryID);
break;
default:
- return Error(Lex.getLoc(), "unexpected summary kind");
+ result = Error(Lex.getLoc(), "unexpected summary kind");
+ break;
}
Lex.setIgnoreColonInIdentifiers(false);
- return false;
+ return result;
}
static bool isValidVisibilityForLinkage(unsigned V, unsigned L) {
OpenPOWER on IntegriCloud