aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-bcanalyzer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-bcanalyzer')
-rw-r--r--tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index c6518a2..a7e27e3 100644
--- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -374,11 +374,7 @@ static void PrintSize(double Bits) {
/// AnalyzeBitcode - Analyze the bitcode file specified by InputFilename.
static int AnalyzeBitcode() {
// Read the input file.
- MemoryBuffer *Buffer;
- if (InputFilename == "-")
- Buffer = MemoryBuffer::getSTDIN();
- else
- Buffer = MemoryBuffer::getFile(&InputFilename[0], InputFilename.size());
+ MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(InputFilename.c_str());
if (Buffer == 0)
return Error("Error reading '" + InputFilename + "'.");