mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
#include "llvm/Target/TargetSelect.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
@@ -74,6 +75,7 @@ LTOCodeGenerator::LTOCodeGenerator()
|
||||
{
|
||||
InitializeAllTargets();
|
||||
InitializeAllMCAsmInfos();
|
||||
InitializeAllMCRegisterInfos();
|
||||
InitializeAllMCSubtargetInfos();
|
||||
InitializeAllAsmPrinters();
|
||||
}
|
||||
@@ -308,7 +310,8 @@ void LTOCodeGenerator::applyScopeRestrictions() {
|
||||
passes.add(createVerifierPass());
|
||||
|
||||
// mark which symbols can not be internalized
|
||||
MCContext Context(*_target->getMCAsmInfo(), NULL);
|
||||
MCContext Context(*_target->getMCAsmInfo(), *_target->getRegisterInfo(),
|
||||
NULL);
|
||||
Mangler mangler(Context, *_target->getTargetData());
|
||||
std::vector<const char*> mustPreserveList;
|
||||
SmallPtrSet<GlobalValue*, 8> asmUsed;
|
||||
|
Reference in New Issue
Block a user