aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2008-02-20 16:44:09 +0000
committerDan Gohman <djg@cray.com>2008-02-20 16:44:09 +0000
commita789bffed03de68a28fc8699e30b9da0d607541c (patch)
treeefe20b5ad260ba442785f90afb2a408febd04e71 /lib
parentbea075fa33f12f318cedaac3439a011263c9b7e6 (diff)
downloadexternal_llvm-a789bffed03de68a28fc8699e30b9da0d607541c.tar.gz
external_llvm-a789bffed03de68a28fc8699e30b9da0d607541c.tar.bz2
external_llvm-a789bffed03de68a28fc8699e30b9da0d607541c.zip
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
-rw-r--r--lib/Support/Annotation.cpp4
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d1de88b7e2..244dee393f 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -262,7 +262,7 @@ class VISIBILITY_HIDDEN WorkListRemover :
public SelectionDAG::DAGUpdateListener {
DAGCombiner &DC;
public:
- WorkListRemover(DAGCombiner &dc) : DC(dc) {}
+ explicit WorkListRemover(DAGCombiner &dc) : DC(dc) {}
virtual void NodeDeleted(SDNode *N) {
DC.removeFromWorkList(N);
diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp
index 9d5e5457d9..3ecc42f782 100644
--- a/lib/Support/Annotation.cpp
+++ b/lib/Support/Annotation.cpp
@@ -57,9 +57,9 @@ AnnotationID AnnotationManager::getID(const std::string &Name) { // Name -> ID
IDMapType::iterator I = IDMap->find(Name);
if (I == IDMap->end()) {
(*IDMap)[Name] = IDCounter++; // Add a new element
- return IDCounter-1;
+ return AnnotationID(IDCounter-1);
}
- return I->second;
+ return AnnotationID(I->second);
}
// getID - Name -> ID + registration of a factory function for demand driven
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index 388071d1e9..d0067b3302 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -1112,7 +1112,7 @@ namespace {
else if (isa<ConstantPointerNull>(V))
return ConstantRange(APInt::getNullValue(typeToWidth(V->getType())));
else
- return typeToWidth(V->getType());
+ return ConstantRange(typeToWidth(V->getType()));
}
// typeToWidth - returns the number of bits necessary to store a value of