summaryrefslogtreecommitdiffstats
path: root/tools/llvm-dis/llvm-dis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-dis/llvm-dis.cpp')
-rw-r--r--tools/llvm-dis/llvm-dis.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index c6f0dcf..0df7328 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -25,6 +25,7 @@
#include "llvm/IR/Type.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DataStream.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -135,7 +136,7 @@ int main(int argc, char **argv) {
DisplayFilename = InputFilename;
M.reset(getStreamedBitcodeModule(DisplayFilename, streamer, Context,
&ErrorMessage));
- if(M.get() != 0) {
+ if(M.get()) {
if (error_code EC = M->materializeAllPermanently()) {
ErrorMessage = EC.message();
M.reset();
@@ -143,7 +144,7 @@ int main(int argc, char **argv) {
}
}
- if (M.get() == 0) {
+ if (!M.get()) {
errs() << argv[0] << ": ";
if (ErrorMessage.size())
errs() << ErrorMessage << "\n";