summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-13 02:24:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-13 02:24:39 +0000
commitdb4ed0bdabc9f61fbd373be416375e38bf1acb27 (patch)
tree0efbd2559140b336f68d1a7528dcc64add57602d /llvm/lib/LTO
parent3453bcf64d394b109ccab19915ba2fa40feeb59b (diff)
downloadbcm5719-llvm-db4ed0bdabc9f61fbd373be416375e38bf1acb27.tar.gz
bcm5719-llvm-db4ed0bdabc9f61fbd373be416375e38bf1acb27.zip
Remove 'using std::errro_code' from lib.
llvm-svn: 210871
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp6
-rw-r--r--llvm/lib/LTO/LTOModule.cpp7
2 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index c263f8f477b..9009958613e 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -53,7 +53,6 @@
#include "llvm/Transforms/ObjCARC.h"
#include <system_error>
using namespace llvm;
-using std::error_code;
const char* LTOCodeGenerator::getVersionString() {
#ifdef LLVM_VERSION_INFO
@@ -209,7 +208,8 @@ bool LTOCodeGenerator::compile_to_file(const char** name,
// make unique temp .o file to put generated object file
SmallString<128> Filename;
int FD;
- error_code EC = sys::fs::createTemporaryFile("lto-llvm", "o", FD, Filename);
+ std::error_code EC =
+ sys::fs::createTemporaryFile("lto-llvm", "o", FD, Filename);
if (EC) {
errMsg = EC.message();
return false;
@@ -253,7 +253,7 @@ const void* LTOCodeGenerator::compile(size_t* length,
// read .o file into memory buffer
std::unique_ptr<MemoryBuffer> BuffPtr;
- if (error_code ec = MemoryBuffer::getFile(name, BuffPtr, -1, false)) {
+ if (std::error_code ec = MemoryBuffer::getFile(name, BuffPtr, -1, false)) {
errMsg = ec.message();
sys::fs::remove(NativeObjectPath);
return nullptr;
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index aee0ef8cdcb..eac48e16e8a 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -43,7 +43,6 @@
#include "llvm/Transforms/Utils/GlobalStatus.h"
#include <system_error>
using namespace llvm;
-using std::error_code;
LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t)
: _module(m), _target(t),
@@ -99,7 +98,7 @@ bool LTOModule::isTargetMatch(MemoryBuffer *buffer, const char *triplePrefix) {
LTOModule *LTOModule::makeLTOModule(const char *path, TargetOptions options,
std::string &errMsg) {
std::unique_ptr<MemoryBuffer> buffer;
- if (error_code ec = MemoryBuffer::getFile(path, buffer)) {
+ if (std::error_code ec = MemoryBuffer::getFile(path, buffer)) {
errMsg = ec.message();
return nullptr;
}
@@ -118,7 +117,7 @@ LTOModule *LTOModule::makeLTOModule(int fd, const char *path,
TargetOptions options,
std::string &errMsg) {
std::unique_ptr<MemoryBuffer> buffer;
- if (error_code ec =
+ if (std::error_code ec =
MemoryBuffer::getOpenFileSlice(fd, path, buffer, map_size, offset)) {
errMsg = ec.message();
return nullptr;
@@ -141,7 +140,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
// parse bitcode buffer
ErrorOr<Module *> ModuleOrErr =
getLazyBitcodeModule(buffer, getGlobalContext());
- if (error_code EC = ModuleOrErr.getError()) {
+ if (std::error_code EC = ModuleOrErr.getError()) {
errMsg = EC.message();
delete buffer;
return nullptr;
OpenPOWER on IntegriCloud