projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make use of isAtLeastRelease/Acquire in the ARM/AArch64 backends
[oota-llvm.git]
/
lib
/
IR
/
GCOV.cpp
diff --git
a/lib/IR/GCOV.cpp
b/lib/IR/GCOV.cpp
index 7a89723d85561ce4df776463c417e577b9bb9c54..1667401f88d0c1bed672d21e530a65d5541ad83b 100644
(file)
--- a/
lib/IR/GCOV.cpp
+++ b/
lib/IR/GCOV.cpp
@@
-19,8
+19,8
@@
#include "llvm/Support/Format.h"
#include "llvm/Support/MemoryObject.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MemoryObject.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/system_error.h"
#include <algorithm>
#include <algorithm>
+#include <system_error>
using namespace llvm;
//===----------------------------------------------------------------------===//
using namespace llvm;
//===----------------------------------------------------------------------===//
@@
-438,11
+438,15
@@
class LineConsumer {
StringRef Remaining;
public:
LineConsumer(StringRef Filename) {
StringRef Remaining;
public:
LineConsumer(StringRef Filename) {
- if (error_code EC = MemoryBuffer::getFileOrSTDIN(Filename, Buffer)) {
+ ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
+ MemoryBuffer::getFileOrSTDIN(Filename);
+ if (std::error_code EC = BufferOrErr.getError()) {
errs() << Filename << ": " << EC.message() << "\n";
Remaining = "";
errs() << Filename << ": " << EC.message() << "\n";
Remaining = "";
- } else
+ } else {
+ Buffer = std::move(BufferOrErr.get());
Remaining = Buffer->getBuffer();
Remaining = Buffer->getBuffer();
+ }
}
bool empty() { return Remaining.empty(); }
void printNext(raw_ostream &OS, uint32_t LineNum) {
}
bool empty() { return Remaining.empty(); }
void printNext(raw_ostream &OS, uint32_t LineNum) {
@@
-511,14
+515,14
@@
std::string FileInfo::getCoveragePath(StringRef Filename,
std::unique_ptr<raw_ostream>
FileInfo::openCoveragePath(StringRef CoveragePath) {
if (Options.NoOutput)
std::unique_ptr<raw_ostream>
FileInfo::openCoveragePath(StringRef CoveragePath) {
if (Options.NoOutput)
- return make_unique<raw_null_ostream>();
+ return
llvm::
make_unique<raw_null_ostream>();
std::string ErrorInfo;
std::string ErrorInfo;
- auto OS =
make_unique<raw_fd_ostream>(CoveragePath.str().c_str(), ErrorInfo
,
- sys::fs::F_Text);
+ auto OS =
llvm::make_unique<raw_fd_ostream>(CoveragePath.str().c_str()
,
+
ErrorInfo,
sys::fs::F_Text);
if (!ErrorInfo.empty()) {
errs() << ErrorInfo << "\n";
if (!ErrorInfo.empty()) {
errs() << ErrorInfo << "\n";
- return make_unique<raw_null_ostream>();
+ return
llvm::
make_unique<raw_null_ostream>();
}
return std::move(OS);
}
}
return std::move(OS);
}