aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 19:36:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 19:36:34 +0000
commitaf9e8e60ae5118066e49730ae5a96aadf3a8f624 (patch)
treecf9035f11cf8a5fd2824f21a38d6c2395ff109f5 /include
parent3ff3a8aa7511bede13e836303a083af37fec4f4e (diff)
downloadexternal_llvm-af9e8e60ae5118066e49730ae5a96aadf3a8f624.zip
external_llvm-af9e8e60ae5118066e49730ae5a96aadf3a8f624.tar.gz
external_llvm-af9e8e60ae5118066e49730ae5a96aadf3a8f624.tar.bz2
Use error_code in GVMaterializer.
They just propagate out the bitcode reader error, so we don't need a new enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/GVMaterializer.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/llvm/GVMaterializer.h b/include/llvm/GVMaterializer.h
index 1e5c426..8efe50a 100644
--- a/include/llvm/GVMaterializer.h
+++ b/include/llvm/GVMaterializer.h
@@ -18,7 +18,7 @@
#ifndef LLVM_GVMATERIALIZER_H
#define LLVM_GVMATERIALIZER_H
-#include <string>
+#include "llvm/Support/system_error.h"
namespace llvm {
@@ -41,11 +41,9 @@ public:
/// dematerialized back to whatever backing store this GVMaterializer uses.
virtual bool isDematerializable(const GlobalValue *GV) const = 0;
- /// Materialize - make sure the given GlobalValue is fully read. If the
- /// module is corrupt, this returns true and fills in the optional string with
- /// information about the problem. If successful, this returns false.
+ /// Materialize - make sure the given GlobalValue is fully read.
///
- virtual bool Materialize(GlobalValue *GV, std::string *ErrInfo = 0) = 0;
+ virtual error_code Materialize(GlobalValue *GV) = 0;
/// Dematerialize - If the given GlobalValue is read in, and if the
/// GVMaterializer supports it, release the memory for the GV, and set it up
@@ -55,10 +53,8 @@ public:
virtual void Dematerialize(GlobalValue *) {}
/// MaterializeModule - make sure the entire Module has been completely read.
- /// On error, this returns true and fills in the optional string with
- /// information about the problem. If successful, this returns false.
///
- virtual bool MaterializeModule(Module *M, std::string *ErrInfo = 0) = 0;
+ virtual error_code MaterializeModule(Module *M) = 0;
};
} // End llvm namespace