lto/addAsmGlobalSymbols: fast path when no module level asm is present.

llvm-svn: 139284
This commit is contained in:
Ivan Krasin 2011-09-08 07:38:25 +00:00
parent 8149dd6619
commit cc2a801f64
1 changed files with 2 additions and 0 deletions

View File

@ -615,6 +615,8 @@ namespace {
bool LTOModule::addAsmGlobalSymbols(MCContext &Context, std::string &errMsg) {
const std::string &inlineAsm = _module->getModuleInlineAsm();
if (inlineAsm.empty())
return false;
OwningPtr<RecordStreamer> Streamer(new RecordStreamer(Context));
MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(inlineAsm);