Index: src/assembler.h |
diff --git a/src/assembler.h b/src/assembler.h |
index 40f50fd5b1a11f3d0d79dffc40926124a98f200c..dfd8cd123bfdc09418d095c80666b1be53c322f8 100644 |
--- a/src/assembler.h |
+++ b/src/assembler.h |
@@ -149,7 +149,7 @@ class Assembler { |
Assembler &operator=(const Assembler &) = delete; |
public: |
- Assembler() : buffer_(*this) {} |
+ Assembler() : FunctionName(""), IsInternal(false), buffer_(*this) {} |
virtual ~Assembler() {} |
// Allocate a chunk of bytes using the per-Assembler allocator. |
@@ -190,9 +190,18 @@ public: |
} |
void emitIASBytes(GlobalContext *Ctx) const; |
+ bool getInternal() const { return IsInternal; } |
+ void setInternal(bool Internal) { IsInternal = Internal; } |
+ const IceString &getFunctionName() { return FunctionName; } |
+ void setFunctionName(const IceString &NewName) { FunctionName = NewName; } |
private: |
ArenaAllocator<32 * 1024> Allocator; |
+ // FunctionName and IsInternal are transferred from the original Cfg |
+ // object, since the Cfg object may be deleted by the time the |
+ // assembler buffer is emitted. |
+ IceString FunctionName; |
+ bool IsInternal; |
protected: |
AssemblerBuffer buffer_; |