summaryrefslogtreecommitdiff
path: root/tools/llvm-dis/llvm-dis.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-14 23:51:27 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-14 23:51:27 +0000
commit1dc66089e6e1e5d226ec1f5e98a0612f68def89d (patch)
tree6df8a2fb819b40fcd1006ca41b1696170e124a27 /tools/llvm-dis/llvm-dis.cpp
parent06a3bddb362ecfc5f3d9ad96301d9b61ef18b552 (diff)
Return an error_code from materializeAllPermanently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dis/llvm-dis.cpp')
-rw-r--r--tools/llvm-dis/llvm-dis.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 6d471efcc0f..9fb056510c0 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -135,8 +135,11 @@ int main(int argc, char **argv) {
DisplayFilename = InputFilename;
M.reset(getStreamedBitcodeModule(DisplayFilename, streamer, Context,
&ErrorMessage));
- if(M.get() != 0 && M->MaterializeAllPermanently(&ErrorMessage)) {
- M.reset();
+ if(M.get() != 0) {
+ if (error_code EC = M->materializeAllPermanently()) {
+ ErrorMessage = EC.message();
+ M.reset();
+ }
}
}