Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Unified Diff: tools/pnacl-llc/ThreadedStreamingCache.cpp

Issue 180483005: Fix PNaCl-local files after merging LLVM 3.4 (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@hs-merge-before-fixes
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/pnacl-llc/ThreadedStreamingCache.h ('k') | tools/pnacl-llc/pnacl-llc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/pnacl-llc/ThreadedStreamingCache.cpp
diff --git a/tools/pnacl-llc/ThreadedStreamingCache.cpp b/tools/pnacl-llc/ThreadedStreamingCache.cpp
index 4176ea248ccd9480103e10bbe37a040eefd4ce9d..b4092c0dcc268d26c937fdac4e40798b0bcf7f04 100644
--- a/tools/pnacl-llc/ThreadedStreamingCache.cpp
+++ b/tools/pnacl-llc/ThreadedStreamingCache.cpp
@@ -25,19 +25,16 @@ ThreadedStreamingCache::ThreadedStreamingCache(
int ThreadedStreamingCache::fetchCacheLine(uint64_t address) const {
uint64_t Base = address & kCacheSizeMask;
- uint64_t Copied;
int Ret;
ScopedLock L(StreamerLock);
if (Streamer->isValidAddress(Base + kCacheSize - 1)) {
- Ret = Streamer->readBytes(Base, kCacheSize, &Cache[0], &Copied);
- assert(Copied == kCacheSize);
+ Ret = Streamer->readBytes(Base, kCacheSize, &Cache[0]);
assert(Ret == 0);
MinObjectSize = Base + kCacheSize;
} else {
uint64_t End = Streamer->getExtent();
assert(End > address && End <= Base + kCacheSize);
- Ret = Streamer->readBytes(Base, End - Base, &Cache[0], &Copied);
- assert(Copied == End - Base);
+ Ret = Streamer->readBytes(Base, End - Base, &Cache[0]);
assert(Ret == 0);
MinObjectSize = End;
}
@@ -56,7 +53,7 @@ int ThreadedStreamingCache::readByte(
}
int ThreadedStreamingCache::readBytes(
- uint64_t address, uint64_t size, uint8_t* buf, uint64_t* copied) const {
+ uint64_t address, uint64_t size, uint8_t* buf) const {
// To keep the cache fetch simple, we currently require that no request cross
// the cache line. This isn't a problem for the bitcode reader because it only
// fetches a byte or a word at a time.
@@ -66,7 +63,6 @@ int ThreadedStreamingCache::readBytes(
if(fetchCacheLine(address))
return -1;
}
- if (copied) *copied = size;
memcpy(buf, &Cache[address - CacheBase], size);
return 0;
}
« no previous file with comments | « tools/pnacl-llc/ThreadedStreamingCache.h ('k') | tools/pnacl-llc/pnacl-llc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698