summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-07 06:53:02 +0000
committerChris Lattner <sabre@nondot.org>2007-02-07 06:53:02 +0000
commitbbe7d71039290442e14f22b575f8f5566f137745 (patch)
tree0669f8860128232d9cf2a0fa2650768ed6b5cc75 /llvm/lib/Bytecode/Reader
parent86fc08145bcbfe400127595a35c57ec32e3ede61 (diff)
downloadbcm5719-llvm-bbe7d71039290442e14f22b575f8f5566f137745.tar.gz
bcm5719-llvm-bbe7d71039290442e14f22b575f8f5566f137745.zip
remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
llvm-svn: 33994
Diffstat (limited to 'llvm/lib/Bytecode/Reader')
-rw-r--r--llvm/lib/Bytecode/Reader/Analyzer.cpp22
-rw-r--r--llvm/lib/Bytecode/Reader/Reader.cpp4
2 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Bytecode/Reader/Analyzer.cpp b/llvm/lib/Bytecode/Reader/Analyzer.cpp
index 94224e36ab8..02e1c66ae6c 100644
--- a/llvm/lib/Bytecode/Reader/Analyzer.cpp
+++ b/llvm/lib/Bytecode/Reader/Analyzer.cpp
@@ -26,7 +26,6 @@
#include <iomanip>
#include <sstream>
#include <ios>
-
using namespace llvm;
namespace {
@@ -542,27 +541,6 @@ public:
bca.BlockSizes[llvm::BytecodeFormat::Reserved_DoNotUse] += 4;
}
- virtual void handleVBR32(unsigned Size ) {
- bca.vbrCount32++;
- bca.vbrCompBytes += Size;
- bca.vbrExpdBytes += sizeof(uint32_t);
- if (currFunc) {
- currFunc->vbrCount32++;
- currFunc->vbrCompBytes += Size;
- currFunc->vbrExpdBytes += sizeof(uint32_t);
- }
- }
-
- virtual void handleVBR64(unsigned Size ) {
- bca.vbrCount64++;
- bca.vbrCompBytes += Size;
- bca.vbrExpdBytes += sizeof(uint64_t);
- if ( currFunc ) {
- currFunc->vbrCount64++;
- currFunc->vbrCompBytes += Size;
- currFunc->vbrExpdBytes += sizeof(uint64_t);
- }
- }
};
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp
index e6b9d8f6556..8d0f86fcaa5 100644
--- a/llvm/lib/Bytecode/Reader/Reader.cpp
+++ b/llvm/lib/Bytecode/Reader/Reader.cpp
@@ -86,7 +86,6 @@ inline unsigned BytecodeReader::read_uint() {
inline unsigned BytecodeReader::read_vbr_uint() {
unsigned Shift = 0;
unsigned Result = 0;
- BufPtr Save = At;
do {
if (At == BlockEnd)
@@ -94,7 +93,6 @@ inline unsigned BytecodeReader::read_vbr_uint() {
Result |= (unsigned)((*At++) & 0x7F) << Shift;
Shift += 7;
} while (At[-1] & 0x80);
- if (Handler) Handler->handleVBR32(At-Save);
return Result;
}
@@ -102,7 +100,6 @@ inline unsigned BytecodeReader::read_vbr_uint() {
inline uint64_t BytecodeReader::read_vbr_uint64() {
unsigned Shift = 0;
uint64_t Result = 0;
- BufPtr Save = At;
do {
if (At == BlockEnd)
@@ -110,7 +107,6 @@ inline uint64_t BytecodeReader::read_vbr_uint64() {
Result |= (uint64_t)((*At++) & 0x7F) << Shift;
Shift += 7;
} while (At[-1] & 0x80);
- if (Handler) Handler->handleVBR64(At-Save);
return Result;
}
OpenPOWER on IntegriCloud