summaryrefslogtreecommitdiffstats
path: root/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
commit782067d0278612ee75d024b9b135c221c327e9e8 (patch)
treea6140557876943cdd800ee997c9317283394b22c /lib/MC/MCDisassembler/MCExternalSymbolizer.cpp
parent6669eceb008a9f13853b330dc0b099d6386fe879 (diff)
downloadFreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.zip
FreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.tar.gz
Vendor import of llvm trunk r238337:
https://llvm.org/svn/llvm-project/llvm/trunk@238337
Diffstat (limited to 'lib/MC/MCDisassembler/MCExternalSymbolizer.cpp')
-rw-r--r--lib/MC/MCDisassembler/MCExternalSymbolizer.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp b/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp
index 0145623..1262e2a 100644
--- a/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp
+++ b/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp
@@ -87,7 +87,7 @@ bool MCExternalSymbolizer::tryAddingSymbolicOperand(MCInst &MI,
if (SymbolicOp.AddSymbol.Present) {
if (SymbolicOp.AddSymbol.Name) {
StringRef Name(SymbolicOp.AddSymbol.Name);
- MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
+ MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
Add = MCSymbolRefExpr::Create(Sym, Ctx);
} else {
Add = MCConstantExpr::Create((int)SymbolicOp.AddSymbol.Value, Ctx);
@@ -98,7 +98,7 @@ bool MCExternalSymbolizer::tryAddingSymbolicOperand(MCInst &MI,
if (SymbolicOp.SubtractSymbol.Present) {
if (SymbolicOp.SubtractSymbol.Name) {
StringRef Name(SymbolicOp.SubtractSymbol.Name);
- MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name);
+ MCSymbol *Sym = Ctx.getOrCreateSymbol(Name);
Sub = MCSymbolRefExpr::Create(Sym, Ctx);
} else {
Sub = MCConstantExpr::Create((int)SymbolicOp.SubtractSymbol.Value, Ctx);
@@ -136,7 +136,7 @@ bool MCExternalSymbolizer::tryAddingSymbolicOperand(MCInst &MI,
if (!Expr)
return false;
- MI.addOperand(MCOperand::CreateExpr(Expr));
+ MI.addOperand(MCOperand::createExpr(Expr));
return true;
}
@@ -186,13 +186,11 @@ void MCExternalSymbolizer::tryAddingPcLoadReferenceComment(raw_ostream &cStream,
namespace llvm {
MCSymbolizer *createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
LLVMSymbolLookupCallback SymbolLookUp,
- void *DisInfo,
- MCContext *Ctx,
- MCRelocationInfo *RelInfo) {
+ void *DisInfo, MCContext *Ctx,
+ std::unique_ptr<MCRelocationInfo> &&RelInfo) {
assert(Ctx && "No MCContext given for symbolic disassembly");
- return new MCExternalSymbolizer(*Ctx,
- std::unique_ptr<MCRelocationInfo>(RelInfo),
- GetOpInfo, SymbolLookUp, DisInfo);
+ return new MCExternalSymbolizer(*Ctx, std::move(RelInfo), GetOpInfo,
+ SymbolLookUp, DisInfo);
}
}
OpenPOWER on IntegriCloud