diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MCExpr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index c0ecad0361..0f3e053de8 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -133,6 +133,12 @@ const MCSymbolRefExpr *MCSymbolRefExpr::Create(const MCSymbol *Sym, return new (Ctx) MCSymbolRefExpr(Sym); } +const MCSymbolRefExpr *MCSymbolRefExpr::Create(const StringRef &Name, + MCContext &Ctx) { + return Create(Ctx.GetOrCreateSymbol(Name), Ctx); +} + + /* *** */ bool MCExpr::EvaluateAsAbsolute(MCContext &Ctx, int64_t &Res) const { |