summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2013-05-24 22:51:52 +0000
committerQuentin Colombet <qcolombet@apple.com>2013-05-24 22:51:52 +0000
commitf482805c285351648cbd2052ccf6b817b726fb0e (patch)
tree3a2acfbd646f1afb70d4bd1ae8a8e4103baf0f08 /llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
parent251f49657897b38603d5aaac7f81d61228fe5728 (diff)
downloadbcm5719-llvm-f482805c285351648cbd2052ccf6b817b726fb0e.tar.gz
bcm5719-llvm-f482805c285351648cbd2052ccf6b817b726fb0e.zip
Follow up of the introduction of MCSymbolizer.
- Ressurect old MCDisassemble API to soften transition. - Extend MCTargetDesc to set target specific symbolizer. llvm-svn: 182688
Diffstat (limited to 'llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp')
-rw-r--r--llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
index 6d23981d635..bd23ce40ec7 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
@@ -384,14 +384,15 @@ static MCInstPrinter *createX86MCInstPrinter(const Target &T,
return 0;
}
-static MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) {
+static MCRelocationInfo *createX86MCRelocationInfo(StringRef TT,
+ MCContext &Ctx) {
Triple TheTriple(TT);
if (TheTriple.isEnvironmentMachO() && TheTriple.getArch() == Triple::x86_64)
return createX86_64MachORelocationInfo(Ctx);
else if (TheTriple.isOSBinFormatELF())
return createX86_64ELFRelocationInfo(Ctx);
// Default to the stock relocation info.
- return llvm::createMCRelocationInfo(Ctx);
+ return llvm::createMCRelocationInfo(TT, Ctx);
}
static MCInstrAnalysis *createX86MCInstrAnalysis(const MCInstrInfo *Info) {
@@ -454,7 +455,7 @@ extern "C" void LLVMInitializeX86TargetMC() {
// Register the MC relocation info.
TargetRegistry::RegisterMCRelocationInfo(TheX86_32Target,
- createMCRelocationInfo);
+ createX86MCRelocationInfo);
TargetRegistry::RegisterMCRelocationInfo(TheX86_64Target,
- createMCRelocationInfo);
+ createX86MCRelocationInfo);
}
OpenPOWER on IntegriCloud