Make the llvm mangler depend only on DataLayout.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 3 Jan 2014 19:21:54 +0000 (19:21 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 3 Jan 2014 19:21:54 +0000 (19:21 +0000)
commit8e0f67dcec577760e3bdc36f0377c6f43e1894d8
tree3bc672a832234d85f97627203e2158d92c6debbf
parent5124fef085c067e0f41e797ae03963154e3bb4e7
Make the llvm mangler depend only on DataLayout.

Before this patch any program that wanted to know the final symbol name of a
GlobalValue had to link with Target.

This patch implements a compromise solution where the mangler uses DataLayout.
This way, any tool that already links with Target (llc, clang) gets the exact
behavior as before and new IR files can be mangled without linking with Target.

With this patch the mangler is constructed with just a DataLayout and DataLayout
is extended to include the information the Mangler needs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198438 91177308-0d34-0410-b5e6-96231b3b80d8
38 files changed:
docs/LangRef.rst
include/llvm/IR/DataLayout.h
include/llvm/MC/MCAsmInfo.h
include/llvm/Target/Mangler.h
include/llvm/Target/TargetLoweringObjectFile.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/MachineFunction.cpp
lib/ExecutionEngine/MCJIT/MCJIT.cpp
lib/IR/DataLayout.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/LTO/LTOModule.cpp
lib/MC/MCAsmInfo.cpp
lib/MC/MCAsmInfoCOFF.cpp
lib/MC/MCAsmInfoDarwin.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/ARM/ARMAsmPrinter.cpp
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/Hexagon/HexagonTargetMachine.cpp
lib/Target/MSP430/MSP430MCInstLower.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/Mangler.cpp
lib/Target/Mips/MipsAsmPrinter.cpp
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCMCInstLower.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/Sparc/SparcAsmPrinter.cpp
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SystemZ/SystemZTargetMachine.cpp
lib/Target/TargetLoweringObjectFile.cpp
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
lib/Target/X86/X86MCInstLower.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/XCore/XCoreAsmPrinter.cpp
lib/Target/XCore/XCoreTargetMachine.cpp