[llvm] r224277 - Revert of r223763, in spirit.

Michael Ilseman milseman at apple.com
Mon Dec 15 13:36:29 PST 2014


Author: milseman
Date: Mon Dec 15 15:36:29 2014
New Revision: 224277

URL: http://llvm.org/viewvc/llvm-project?rev=224277&view=rev
Log:
Revert of r223763, in spirit.

r223763 was made to work around a temporary issue where a user of the
JIT was passing down a declaration (incorrectly). This shouldn't
occur, so assert rather than silently continue.

Modified:
    llvm/trunk/lib/Linker/LinkModules.cpp

Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=224277&r1=224276&r2=224277&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Mon Dec 15 15:36:29 2014
@@ -1533,8 +1533,7 @@ bool ModuleLinker::run() {
     LazilyLinkGlobalValues.pop_back();
 
     if (auto F = dyn_cast<Function>(SGV))
-      if (F->isDeclaration())
-        continue;
+      assert(!F->isDeclaration() && "users should not pass down decls");
     if (linkGlobalValueBody(*SGV))
       return true;
   }





More information about the llvm-commits mailing list