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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ivan Krasin 2011-09-08 07:38:25 +00:00
parent 603e103988
commit 6d483c2b07

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);