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

Unified Diff: src/IceTargetLowering.h

Issue 619893002: Subzero: Auto-awesome iterators. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use AsmCodeByte instead of uint8_t Created 6 years, 3 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 | « src/IceRegAlloc.cpp ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 1995124826d066cffd229671e1bc4066c58e9162..43e6a012a7557328ad2915052c36e1d811c37ff1 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -24,6 +24,8 @@
namespace Ice {
+typedef uint8_t AsmCodeByte;
+
class Assembler;
// LoweringContext makes it easy to iterate through non-deleted
@@ -52,6 +54,9 @@ public:
bool atEnd() const { return Cur == End; }
InstList::iterator getCur() const { return Cur; }
InstList::iterator getEnd() const { return End; }
+ // Adaptor to enable range-based for loops.
+ InstList::iterator begin() const { return getCur(); }
+ InstList::iterator end() const { return getEnd(); }
void insert(Inst *Inst);
Inst *getLastInserted() const;
void advanceCur() { Cur = Next; }
@@ -145,7 +150,7 @@ public:
virtual SizeT getFrameOrStackReg() const = 0;
virtual size_t typeWidthInBytesOnStack(Type Ty) const = 0;
virtual SizeT getBundleAlignLog2Bytes() const = 0;
- virtual llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const = 0;
+ virtual llvm::ArrayRef<AsmCodeByte> getNonExecBundlePadding() const = 0;
bool hasComputedFrame() const { return HasComputedFrame; }
bool shouldDoNopInsertion() const;
// Returns true if this function calls a function that has the
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698