aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-28 10:38:48 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-28 10:39:42 -0800
commit285911f5875b18c12ebc1e82621a7b7ac0f164d2 (patch)
tree8e72643bcb1f7529d7bba66527c6ed0b8e394723 /lib
parentad068bc5fd5d19f5f48d69d3a39d8aacbbd26e85 (diff)
use use_empty
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index da28c26e4b..8a82bbdb94 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -582,7 +582,7 @@ std::string JSWriter::getAssign(const Instruction *I) {
std::string JSWriter::getAssignIfNeeded(const Value *V) {
if (const Instruction *I = dyn_cast<Instruction>(V)) {
- if (I->getNumUses() > 0) return getAssign(I);
+ if (!I->use_empty()) return getAssign(I);
}
return std::string();
}
@@ -1790,7 +1790,7 @@ void JSWriter::printFunction(const Function *F) {
unsigned Next = 1;
for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
AI != AE; ++AI) {
- if (!AI->hasName() && AI->hasNUsesOrMore(1)) {
+ if (!AI->hasName() && !AI->use_empty()) {
ValueNames[AI] = "$" + utostr(Next++);
}
}
@@ -1798,7 +1798,7 @@ void JSWriter::printFunction(const Function *F) {
BI != BE; ++BI) {
for (BasicBlock::const_iterator II = BI->begin(), E = BI->end();
II != E; ++II) {
- if (!II->hasName() && II->hasNUsesOrMore(1)) {
+ if (!II->hasName() && !II->use_empty()) {
ValueNames[II] = "$" + utostr(Next++);
}
}
@@ -1910,7 +1910,7 @@ void JSWriter::printModuleBody() {
bool first = true;
for (Module::const_iterator I = TheModule->begin(), E = TheModule->end();
I != E; ++I) {
- if (I->isDeclaration() && I->hasNUsesOrMore(1)) {
+ if (I->isDeclaration() && !I->use_empty()) {
if (first) {
first = false;
} else {