mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-16 04:52:16 +00:00
Remove getTargetTriple and update all uses to use the Triple off
of the TargetMachine. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283002 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c503049b8
commit
26e89a710f
@ -172,9 +172,6 @@ public:
|
|||||||
|
|
||||||
void EmitToStreamer(MCStreamer &S, const MCInst &Inst);
|
void EmitToStreamer(MCStreamer &S, const MCInst &Inst);
|
||||||
|
|
||||||
/// Return the target triple string.
|
|
||||||
StringRef getTargetTriple() const;
|
|
||||||
|
|
||||||
/// Return the current section we are emitting to.
|
/// Return the current section we are emitting to.
|
||||||
const MCSection *getCurrentSection() const;
|
const MCSection *getCurrentSection() const;
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ const DataLayout &AsmPrinter::getDataLayout() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Do not use the cached DataLayout because some client use it without a Module
|
// Do not use the cached DataLayout because some client use it without a Module
|
||||||
// (llmv-dsymutil, llvm-dwarfdump).
|
// (llvm-dsymutil, llvm-dwarfdump).
|
||||||
unsigned AsmPrinter::getPointerSize() const { return TM.getPointerSize(); }
|
unsigned AsmPrinter::getPointerSize() const { return TM.getPointerSize(); }
|
||||||
|
|
||||||
const MCSubtargetInfo &AsmPrinter::getSubtargetInfo() const {
|
const MCSubtargetInfo &AsmPrinter::getSubtargetInfo() const {
|
||||||
@ -155,17 +155,11 @@ void AsmPrinter::EmitToStreamer(MCStreamer &S, const MCInst &Inst) {
|
|||||||
S.EmitInstruction(Inst, getSubtargetInfo());
|
S.EmitInstruction(Inst, getSubtargetInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef AsmPrinter::getTargetTriple() const {
|
|
||||||
return TM.getTargetTriple().str();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// getCurrentSection() - Return the current section we are emitting to.
|
/// getCurrentSection() - Return the current section we are emitting to.
|
||||||
const MCSection *AsmPrinter::getCurrentSection() const {
|
const MCSection *AsmPrinter::getCurrentSection() const {
|
||||||
return OutStreamer->getCurrentSection().first;
|
return OutStreamer->getCurrentSection().first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
MachineFunctionPass::getAnalysisUsage(AU);
|
MachineFunctionPass::getAnalysisUsage(AU);
|
||||||
@ -192,7 +186,7 @@ bool AsmPrinter::doInitialization(Module &M) {
|
|||||||
// alternative is duplicated code in each of the target asm printers that
|
// alternative is duplicated code in each of the target asm printers that
|
||||||
// use the directive, where it would need the same conditionalization
|
// use the directive, where it would need the same conditionalization
|
||||||
// anyway.
|
// anyway.
|
||||||
Triple TT(getTargetTriple());
|
const Triple &TT = TM.getTargetTriple();
|
||||||
// If there is a version specified, Major will be non-zero.
|
// If there is a version specified, Major will be non-zero.
|
||||||
if (TT.isOSDarwin() && TT.getOSMajorVersion() != 0) {
|
if (TT.isOSDarwin() && TT.getOSMajorVersion() != 0) {
|
||||||
unsigned Major, Minor, Update;
|
unsigned Major, Minor, Update;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user