diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-06 04:43:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-06 04:43:00 +0000 |
commit | 592488a4ef92ce8e454dc029808ed1b6612b7312 (patch) | |
tree | f4de499ba43831ac16bc1714d6e723336861a2dd /tools/opt/opt.cpp | |
parent | e96eec0c6966473ed8f71ecf4d2dd37daec29d36 (diff) | |
download | external_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.cpp | 8 |
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 + "'"; |