Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit c8fccc5

Browse files
committed
Merging r300267:
------------------------------------------------------------------------ r300267 | tejohnson | 2017-04-13 17:51:49 -0400 (Thu, 13 Apr 2017) | 11 lines [Support] Fix ErrorOr assertion when /proc/cpuinfo doesn't exist. The ErrorOr should not be dereferenced on the error path. Patch by Jacob Young Reviewers: tejohnson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32032 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@305264 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent bf9338a commit c8fccc5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Support/Host.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,7 @@ static int computeHostNumPhysicalCores() {
12321232
if (std::error_code EC = Text.getError()) {
12331233
llvm::errs() << "Can't read "
12341234
<< "/proc/cpuinfo: " << EC.message() << "\n";
1235+
return -1;
12351236
}
12361237
SmallVector<StringRef, 8> strs;
12371238
(*Text)->getBuffer().split(strs, "\n", /*MaxSplit=*/-1,

0 commit comments

Comments
 (0)