aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CBackend/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r--lib/Target/CBackend/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index a3607be..af33e4b 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -88,7 +88,7 @@ namespace {
static bool isInlinableInst(const Instruction &I) {
// Must be an expression, must be used exactly once. If it is dead, we
// emit it inline where it would go.
- if (I.getType() == Type::VoidTy || I.use_size() != 1 ||
+ if (I.getType() == Type::VoidTy || !I.hasOneUse() ||
isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I) ||
isa<LoadInst>(I) || isa<VarArgInst>(I))
// Don't inline a load across a store or other bad things!