[llvm-commits] [llvm] r139284 - /llvm/trunk/tools/lto/LTOModule.cpp
Ivan Krasin
krasin at chromium.org
Thu Sep 8 00:38:25 PDT 2011
Author: krasin
Date: Thu Sep 8 02:38:25 2011
New Revision: 139284
URL: http://llvm.org/viewvc/llvm-project?rev=139284&view=rev
Log:
lto/addAsmGlobalSymbols: fast path when no module level asm is present.
Modified:
llvm/trunk/tools/lto/LTOModule.cpp
Modified: llvm/trunk/tools/lto/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=139284&r1=139283&r2=139284&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto/LTOModule.cpp Thu Sep 8 02:38:25 2011
@@ -615,6 +615,8 @@
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);
More information about the llvm-commits
mailing list