[LTO] Fix the LTO tool, after my API breakage.

Thanks to Zonr Chang!

llvm-svn: 190602
This commit is contained in:
Joey Gouly 2013-09-12 12:55:29 +00:00
parent 92dfcfa403
commit db6144e3e3
1 changed files with 3 additions and 1 deletions

View File

@ -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<MCInstrInfo> MCII(T.createMCInstrInfo());
OwningPtr<MCSubtargetInfo>
STI(T.createMCSubtargetInfo(_target->getTargetTriple(),
_target->getTargetCPU(),
_target->getTargetFeatureString()));
OwningPtr<MCTargetAsmParser> TAP(T.createMCAsmParser(*STI, *Parser.get()));
OwningPtr<MCTargetAsmParser> TAP(T.createMCAsmParser(*STI, *Parser.get(), *MCII));
if (!TAP) {
errMsg = "target " + std::string(T.getName()) +
" does not define AsmParser.";