aboutsummaryrefslogtreecommitdiffstats
path: root/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 04:43:00 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 04:43:00 +0000
commit592488a4ef92ce8e454dc029808ed1b6612b7312 (patch)
treef4de499ba43831ac16bc1714d6e723336861a2dd /tools/opt/opt.cpp
parente96eec0c6966473ed8f71ecf4d2dd37daec29d36 (diff)
downloadexternal_llvm-592488a4ef92ce8e454dc029808ed1b6612b7312.zip
external_llvm-592488a4ef92ce8e454dc029808ed1b6612b7312.tar.gz
external_llvm-592488a4ef92ce8e454dc029808ed1b6612b7312.tar.bz2
add support to llvm-prof for reading from a bitcode file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r--tools/opt/opt.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 6c77085..218e5f0 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -268,12 +268,8 @@ int main(int argc, char **argv) {
// Load the input module...
std::auto_ptr<Module> M;
if (Bitcode) {
- MemoryBuffer *Buffer;
- if (InputFilename == "-") {
- Buffer = MemoryBuffer::getSTDIN();
- } else {
- Buffer = MemoryBuffer::getFile(&InputFilename[0], InputFilename.size());
- }
+ MemoryBuffer *Buffer
+ = MemoryBuffer::getFileOrSTDIN(&InputFilename[0], InputFilename.size());
if (Buffer == 0)
ErrorMessage = "Error reading file '" + InputFilename + "'";