aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitde7cbbfcce5c068f0699bdcb6dac093c0c91ba6f (patch)
tree5ab055706a3d1e3379dd568d4ee386fa2563f518 /lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
parentfce7b6b5d9905bf35641ee7f001b6b66dbc26c2d (diff)
downloadexternal_llvm-de7cbbfcce5c068f0699bdcb6dac093c0c91ba6f.zip
external_llvm-de7cbbfcce5c068f0699bdcb6dac093c0c91ba6f.tar.gz
external_llvm-de7cbbfcce5c068f0699bdcb6dac093c0c91ba6f.tar.bz2
Follow up of the introduction of MCSymbolizer.
- Ressurect old MCDisassemble API to soften transition. - Extend MCTargetDesc to set target specific symbolizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp')
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
index 6d23981..bd23ce4 100644
--- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
+++ b/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);
}