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;
}
// 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 {
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);
// 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;