projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4838f6
)
Sink the isa into the assert
author
Michael Ilseman
<milseman@apple.com>
Mon, 15 Dec 2014 23:41:21 +0000
(23:41 +0000)
committer
Michael Ilseman
<milseman@apple.com>
Mon, 15 Dec 2014 23:41:21 +0000
(23:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224291
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Linker/LinkModules.cpp
patch
|
blob
|
history
diff --git
a/lib/Linker/LinkModules.cpp
b/lib/Linker/LinkModules.cpp
index d6f4ef81d743872816bb3bd975a63c68344d60cf..cba6f1a31816f78f6d48dd065bbdea199e518eaa 100644
(file)
--- a/
lib/Linker/LinkModules.cpp
+++ b/
lib/Linker/LinkModules.cpp
@@
-1532,10
+1532,8
@@
bool ModuleLinker::run() {
GlobalValue *SGV = LazilyLinkGlobalValues.back();
LazilyLinkGlobalValues.pop_back();
- if (isa<Function>(SGV))
- assert(!cast<Function>(SGV)->isDeclaration() &&
- "users should not pass down decls");
-
+ assert((!isa<Function>(SGV) || !cast<Function>(SGV)->isDeclaration()) &&
+ "users should not pass down decls");
if (linkGlobalValueBody(*SGV))
return true;
}