From 9de16c1008e11633ea3df8e095e25f3082c11c32 Mon Sep 17 00:00:00 2001 From: Joey Gouly Date: Thu, 12 Sep 2013 12:55:29 +0000 Subject: [PATCH] [LTO] Fix the LTO tool, after my API breakage. Thanks to Zonr Chang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190602 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/LTOModule.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 18123460774..1a9d8f5c4ed 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -21,6 +21,7 @@ #include "llvm/IR/Module.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" +#include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCParser/MCAsmParser.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSubtargetInfo.h" @@ -813,11 +814,12 @@ bool LTOModule::addAsmGlobalSymbols(std::string &errMsg) { _context, *Streamer, *_target->getMCAsmInfo())); const Target &T = _target->getTarget(); + OwningPtr MCII(T.createMCInstrInfo()); OwningPtr STI(T.createMCSubtargetInfo(_target->getTargetTriple(), _target->getTargetCPU(), _target->getTargetFeatureString())); - OwningPtr TAP(T.createMCAsmParser(*STI, *Parser.get())); + OwningPtr TAP(T.createMCAsmParser(*STI, *Parser.get(), *MCII)); if (!TAP) { errMsg = "target " + std::string(T.getName()) + " does not define AsmParser.";