[llvm] r283002 - Remove getTargetTriple and update all uses to use the Triple off
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 18:50:33 PDT 2016
Author: echristo
Date: Fri Sep 30 20:50:33 2016
New Revision: 283002
URL: http://llvm.org/viewvc/llvm-project?rev=283002&view=rev
Log:
Remove getTargetTriple and update all uses to use the Triple off
of the TargetMachine. NFC.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=283002&r1=283001&r2=283002&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Fri Sep 30 20:50:33 2016
@@ -172,9 +172,6 @@ public:
void EmitToStreamer(MCStreamer &S, const MCInst &Inst);
- /// Return the target triple string.
- StringRef getTargetTriple() const;
-
/// Return the current section we are emitting to.
const MCSection *getCurrentSection() const;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=283002&r1=283001&r2=283002&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Sep 30 20:50:33 2016
@@ -143,7 +143,7 @@ const DataLayout &AsmPrinter::getDataLay
}
// 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(); }
const MCSubtargetInfo &AsmPrinter::getSubtargetInfo() const {
@@ -155,17 +155,11 @@ void AsmPrinter::EmitToStreamer(MCStream
S.EmitInstruction(Inst, getSubtargetInfo());
}
-StringRef AsmPrinter::getTargetTriple() const {
- return TM.getTargetTriple().str();
-}
-
/// getCurrentSection() - Return the current section we are emitting to.
const MCSection *AsmPrinter::getCurrentSection() const {
return OutStreamer->getCurrentSection().first;
}
-
-
void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
MachineFunctionPass::getAnalysisUsage(AU);
@@ -192,7 +186,7 @@ bool AsmPrinter::doInitialization(Module
// alternative is duplicated code in each of the target asm printers that
// use the directive, where it would need the same conditionalization
// anyway.
- Triple TT(getTargetTriple());
+ const Triple &TT = TM.getTargetTriple();
// If there is a version specified, Major will be non-zero.
if (TT.isOSDarwin() && TT.getOSMajorVersion() != 0) {
unsigned Major, Minor, Update;
More information about the llvm-commits
mailing list