[llvm-commits] CVS: llvm/tools/llvm-prof/Makefile llvm-prof.cpp
Chris Lattner
sabre at nondot.org
Sun May 6 02:31:07 PDT 2007
Changes in directory llvm/tools/llvm-prof:
Makefile updated: 1.10 -> 1.11
llvm-prof.cpp updated: 1.32 -> 1.33
---
Log message:
switch tools to bitcode instead of bytecode
---
Diffs of the changes: (+8 -16)
Makefile | 2 +-
llvm-prof.cpp | 22 +++++++---------------
2 files changed, 8 insertions(+), 16 deletions(-)
Index: llvm/tools/llvm-prof/Makefile
diff -u llvm/tools/llvm-prof/Makefile:1.10 llvm/tools/llvm-prof/Makefile:1.11
--- llvm/tools/llvm-prof/Makefile:1.10 Sat May 5 23:43:00 2007
+++ llvm/tools/llvm-prof/Makefile Sun May 6 04:29:57 2007
@@ -9,7 +9,7 @@
LEVEL = ../..
TOOLNAME = llvm-prof
-LINK_COMPONENTS = bcreader bitreader analysis
+LINK_COMPONENTS = bitreader analysis
REQUIRES_EH := 1
include $(LEVEL)/Makefile.common
Index: llvm/tools/llvm-prof/llvm-prof.cpp
diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.32 llvm/tools/llvm-prof/llvm-prof.cpp:1.33
--- llvm/tools/llvm-prof/llvm-prof.cpp:1.32 Sat May 5 23:43:00 2007
+++ llvm/tools/llvm-prof/llvm-prof.cpp Sun May 6 04:29:57 2007
@@ -17,7 +17,6 @@
#include "llvm/Module.h"
#include "llvm/Assembly/AsmAnnotationWriter.h"
#include "llvm/Analysis/ProfileInfoLoader.h"
-#include "llvm/Bytecode/Reader.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
@@ -32,7 +31,6 @@
using namespace llvm;
namespace {
- cl::opt<bool> Bitcode("bitcode");
cl::opt<std::string>
BytecodeFile(cl::Positional, cl::desc("<program bytecode file>"),
cl::Required);
@@ -120,19 +118,13 @@
// Read in the bytecode file...
std::string ErrorMessage;
Module *M;
- if (Bitcode) {
- MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&BytecodeFile[0],
- BytecodeFile.size());
- if (Buffer == 0)
- ErrorMessage = "Error reading file '" + BytecodeFile + "'";
- else
- M = ParseBitcodeFile(Buffer, &ErrorMessage);
- delete Buffer;
- } else {
- M = ParseBytecodeFile(BytecodeFile,
- Compressor::decompressToNewBuffer,
- &ErrorMessage);
- }
+ MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&BytecodeFile[0],
+ BytecodeFile.size());
+ if (Buffer == 0)
+ ErrorMessage = "Error reading file '" + BytecodeFile + "'";
+ else
+ M = ParseBitcodeFile(Buffer, &ErrorMessage);
+ delete Buffer;
if (M == 0) {
std::cerr << argv[0] << ": " << BytecodeFile << ": "
<< ErrorMessage << "\n";
More information about the llvm-commits
mailing list