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

Side by Side Diff: tools/pnacl-llc/ThreadedStreamingCache.h

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, 9 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 unified diff | Download patch
« no previous file with comments | « tools/pnacl-freeze/pnacl-freeze.cpp ('k') | tools/pnacl-llc/ThreadedStreamingCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //==- ThreadedStreamingCache.h - Cache for StreamingMemoryObject -*- C++ -*-==// 1 //==- ThreadedStreamingCache.h - Cache for StreamingMemoryObject -*- C++ -*-==//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 #ifndef THREADEDSTREAMINGCACHE_H 10 #ifndef THREADEDSTREAMINGCACHE_H
(...skipping 11 matching lines...) Expand all
22 // Its interface is exactly the same as StreamableMemoryObject. 22 // Its interface is exactly the same as StreamableMemoryObject.
23 23
24 class ThreadedStreamingCache : public llvm::StreamableMemoryObject { 24 class ThreadedStreamingCache : public llvm::StreamableMemoryObject {
25 public: 25 public:
26 explicit ThreadedStreamingCache(llvm::StreamingMemoryObject *S); 26 explicit ThreadedStreamingCache(llvm::StreamingMemoryObject *S);
27 virtual uint64_t getBase() const LLVM_OVERRIDE { return 0; } 27 virtual uint64_t getBase() const LLVM_OVERRIDE { return 0; }
28 virtual uint64_t getExtent() const LLVM_OVERRIDE; 28 virtual uint64_t getExtent() const LLVM_OVERRIDE;
29 virtual int readByte(uint64_t address, uint8_t* ptr) const LLVM_OVERRIDE; 29 virtual int readByte(uint64_t address, uint8_t* ptr) const LLVM_OVERRIDE;
30 virtual int readBytes(uint64_t address, 30 virtual int readBytes(uint64_t address,
31 uint64_t size, 31 uint64_t size,
32 uint8_t* buf, 32 uint8_t* buf) const LLVM_OVERRIDE;
33 uint64_t* copied) const LLVM_OVERRIDE;
34 virtual const uint8_t *getPointer(uint64_t address, 33 virtual const uint8_t *getPointer(uint64_t address,
35 uint64_t size) const LLVM_OVERRIDE { 34 uint64_t size) const LLVM_OVERRIDE {
36 // This could be fixed by ensuring the bytes are fetched and making a copy, 35 // This could be fixed by ensuring the bytes are fetched and making a copy,
37 // requiring that the bitcode size be known, or otherwise ensuring that 36 // requiring that the bitcode size be known, or otherwise ensuring that
38 // the memory doesn't go away/get reallocated, but it's 37 // the memory doesn't go away/get reallocated, but it's
39 // not currently necessary. Users that need the pointer don't stream. 38 // not currently necessary. Users that need the pointer don't stream.
40 llvm_unreachable("getPointer in streaming memory objects not allowed"); 39 llvm_unreachable("getPointer in streaming memory objects not allowed");
41 return NULL; 40 return NULL;
42 } 41 }
43 virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE; 42 virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE;
(...skipping 24 matching lines...) Expand all
68 mutable uint64_t MinObjectSize; 67 mutable uint64_t MinObjectSize;
69 // Current base address for the cache. 68 // Current base address for the cache.
70 mutable uint64_t CacheBase; 69 mutable uint64_t CacheBase;
71 70
72 ThreadedStreamingCache( 71 ThreadedStreamingCache(
73 const ThreadedStreamingCache&) LLVM_DELETED_FUNCTION; 72 const ThreadedStreamingCache&) LLVM_DELETED_FUNCTION;
74 void operator=(const ThreadedStreamingCache&) LLVM_DELETED_FUNCTION; 73 void operator=(const ThreadedStreamingCache&) LLVM_DELETED_FUNCTION;
75 }; 74 };
76 75
77 #endif // THREADEDSTREAMINGCACHE_H 76 #endif // THREADEDSTREAMINGCACHE_H
OLDNEW
« no previous file with comments | « tools/pnacl-freeze/pnacl-freeze.cpp ('k') | tools/pnacl-llc/ThreadedStreamingCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698