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

Side by Side Diff: src/IceOperand.h

Issue 904783002: Subzero: Convert a few getName() methods to return a const string ref. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/IceELFSection.h ('k') | src/PNaClTranslator.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 //===- subzero/src/IceOperand.h - High-level operands -----------*- C++ -*-===// 1 //===- subzero/src/IceOperand.h - High-level operands -----------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
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 // This file declares the Operand class and its target-independent 10 // This file declares the Operand class and its target-independent
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 static ConstantRelocatable *create(GlobalContext *Ctx, Type Ty, 216 static ConstantRelocatable *create(GlobalContext *Ctx, Type Ty,
217 const RelocatableTuple &Tuple, 217 const RelocatableTuple &Tuple,
218 uint32_t PoolEntryID) { 218 uint32_t PoolEntryID) {
219 assert(!Ctx->isIRGenerationDisabled() && 219 assert(!Ctx->isIRGenerationDisabled() &&
220 "Attempt to build relocatable constant when IR generation disabled"); 220 "Attempt to build relocatable constant when IR generation disabled");
221 return new (Ctx->allocate<ConstantRelocatable>()) ConstantRelocatable( 221 return new (Ctx->allocate<ConstantRelocatable>()) ConstantRelocatable(
222 Ty, Tuple.Offset, Tuple.Name, Tuple.SuppressMangling, PoolEntryID); 222 Ty, Tuple.Offset, Tuple.Name, Tuple.SuppressMangling, PoolEntryID);
223 } 223 }
224 224
225 RelocOffsetT getOffset() const { return Offset; } 225 RelocOffsetT getOffset() const { return Offset; }
226 IceString getName() const { return Name; } 226 const IceString &getName() const { return Name; }
227 void setSuppressMangling(bool Value) { SuppressMangling = Value; } 227 void setSuppressMangling(bool Value) { SuppressMangling = Value; }
228 bool getSuppressMangling() const { return SuppressMangling; } 228 bool getSuppressMangling() const { return SuppressMangling; }
229 using Constant::emit; 229 using Constant::emit;
230 using Constant::dump; 230 using Constant::dump;
231 void emit(GlobalContext *Ctx) const override; 231 void emit(GlobalContext *Ctx) const override;
232 void emitWithoutDollar(GlobalContext *Ctx) const; 232 void emitWithoutDollar(GlobalContext *Ctx) const;
233 void dump(const Cfg *Func, Ostream &Str) const override; 233 void dump(const Cfg *Func, Ostream &Str) const override;
234 234
235 static bool classof(const Operand *Operand) { 235 static bool classof(const Operand *Operand) {
236 OperandKind Kind = Operand->getKind(); 236 OperandKind Kind = Operand->getKind();
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 private: 621 private:
622 const Cfg *Func; 622 const Cfg *Func;
623 MetadataKind Kind; 623 MetadataKind Kind;
624 std::vector<VariableTracking> Metadata; 624 std::vector<VariableTracking> Metadata;
625 const static InstDefList NoDefinitions; 625 const static InstDefList NoDefinitions;
626 }; 626 };
627 627
628 } // end of namespace Ice 628 } // end of namespace Ice
629 629
630 #endif // SUBZERO_SRC_ICEOPERAND_H 630 #endif // SUBZERO_SRC_ICEOPERAND_H
OLDNEW
« no previous file with comments | « src/IceELFSection.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698