summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.h39
1 files changed, 33 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.h b/llvm/lib/CodeGen/AsmPrinter/DIE.h
index eaa61d925ea..412c09c6c8e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.h
@@ -190,6 +190,7 @@ namespace llvm {
enum {
isInteger,
isString,
+ isExpr,
isLabel,
isDelta,
isEntry,
@@ -263,14 +264,40 @@ namespace llvm {
};
//===--------------------------------------------------------------------===//
- /// DIELabel - A label expression DIE.
+ /// DIEExpr - An expression DIE.
+ //
+ class DIEExpr : public DIEValue {
+ const MCExpr *Expr;
+ public:
+ explicit DIEExpr(const MCExpr *E) : DIEValue(isExpr), Expr(E) {}
+
+ /// EmitValue - Emit expression value.
+ ///
+ virtual void EmitValue(AsmPrinter *AP, unsigned Form) const;
+
+ /// getValue - Get MCExpr.
+ ///
+ const MCExpr *getValue() const { return Expr; }
+
+ /// SizeOf - Determine size of expression value in bytes.
+ ///
+ virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const;
+
+ // Implement isa/cast/dyncast.
+ static bool classof(const DIEValue *E) { return E->getType() == isExpr; }
+
+#ifndef NDEBUG
+ virtual void print(raw_ostream &O) const;
+#endif
+ };
+
+ //===--------------------------------------------------------------------===//
+ /// DIELabel - A label DIE.
//
class DIELabel : public DIEValue {
- const MCSymbolRefExpr *Label;
+ const MCSymbol *Label;
public:
- explicit DIELabel(const MCSymbolRefExpr *L) : DIEValue(isLabel), Label(L) {}
- explicit DIELabel(const MCSymbol *Sym, MCContext &Ctxt)
- : DIEValue(isLabel), Label(MCSymbolRefExpr::Create(Sym, Ctxt)) {}
+ explicit DIELabel(const MCSymbol *L) : DIEValue(isLabel), Label(L) {}
/// EmitValue - Emit label value.
///
@@ -278,7 +305,7 @@ namespace llvm {
/// getValue - Get MCSymbol.
///
- const MCSymbolRefExpr *getValue() const { return Label; }
+ const MCSymbol *getValue() const { return Label; }
/// SizeOf - Determine size of label value in bytes.
///
OpenPOWER on IntegriCloud