Chromium Code Reviews| Index: src/IceGlobalContext.h |
| diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h |
| index fd76bd7ff8332dd26b5992f9ca3715ee94d6ad6a..a833feb162565fd64910bafb75741c43df59beca 100644 |
| --- a/src/IceGlobalContext.h |
| +++ b/src/IceGlobalContext.h |
| @@ -155,7 +155,7 @@ public: |
| /// The dump stream is a log stream while emit is the stream code |
| /// is emitted to. The error stream is strictly for logging errors. |
| GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError, |
| - ELFStreamer *ELFStreamer, const ClFlags &Flags); |
| + ELFStreamer *ELFStreamer); |
| ~GlobalContext(); |
| /// |
| @@ -185,7 +185,7 @@ public: |
| /// names of translated functions. This makes it easier to create an |
| /// execution test against a reference translator like llc, with both |
| /// translators using the same bitcode as input. |
| - IceString mangleName(const IceString &Name) const; |
| + static IceString mangleName(const IceString &Name); |
|
John
2016/03/06 22:39:38
This declaration "smells". There's really no good
Jim Stichnoth
2016/03/07 00:03:10
Done - moved into new file IceMangling.cpp.
|
| /// \name Manage Constants. |
| /// @{ |
| @@ -202,10 +202,8 @@ public: |
| /// Returns a symbolic constant. |
| Constant *getConstantSym(const RelocOffsetT Offset, |
| const RelocOffsetArray &OffsetExpr, |
| - const IceString &Name, const IceString &EmitString, |
| - bool SuppressMangling); |
| - Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name, |
| - bool SuppressMangling); |
| + const IceString &Name, const IceString &EmitString); |
| + Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name); |
| Constant *getConstantExternSym(const IceString &Name); |
| /// Returns an undef. |
| Constant *getConstantUndef(Type Ty); |
| @@ -221,10 +219,10 @@ public: |
| /// Return a locked pointer to the registered jump tables. |
| JumpTableDataList getJumpTables(); |
| /// Create a new jump table entry and return a reference to it. |
| - JumpTableData &addJumpTable(IceString FuncName, SizeT Id, |
| + JumpTableData &addJumpTable(const IceString &FuncName, SizeT Id, |
| const JumpTableData::TargetList &TargetList); |
| - const ClFlags &getFlags() const { return Flags; } |
| + static const ClFlags &getFlags() { return Flags; } |
|
John
2016/03/06 22:39:38
Ditto.
Jim Stichnoth
2016/03/07 00:03:10
I assume this is about flags being global, in whic
|
| /// Allocate data of type T using the global allocator. We allow entities |
| /// allocated from this global allocator to be either trivially or |
| @@ -438,6 +436,9 @@ public: |
| return Match.empty() || Match == SymbolName; |
| } |
| + static ClFlags Flags; |
| + static ClFlagsExtra ExtraFlags; |
| + |
| private: |
| // Try to ensure mutexes are allocated on separate cache lines. |
| @@ -489,7 +490,6 @@ private: |
| ICE_CACHELINE_BOUNDARY; |
| Intrinsics IntrinsicsInfo; |
| - const ClFlags &Flags; |
| // TODO(jpp): move to EmitterContext. |
| std::unique_ptr<ELFObjectWriter> ObjectWriter; |
| BoundedProducerConsumerQueue<Cfg> OptQ; |
| @@ -550,7 +550,7 @@ private: |
| // Private helpers for mangleName() |
| using ManglerVector = llvm::SmallVector<char, 32>; |
| - void incrementSubstitutions(ManglerVector &OldName) const; |
| + static void incrementSubstitutions(ManglerVector &OldName); |
| public: |
| static void TlsInit() { ICE_TLS_INIT_FIELD(TLS); } |