mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-22 19:50:55 +00:00
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
948d8eadec
commit
b5660dc822
@ -43,7 +43,9 @@ class AnnotationID {
|
|||||||
unsigned ID;
|
unsigned ID;
|
||||||
|
|
||||||
AnnotationID(); // Default ctor is disabled
|
AnnotationID(); // Default ctor is disabled
|
||||||
inline AnnotationID(unsigned i) : ID(i) {} // Only creatable from AnnMgr
|
|
||||||
|
// AnnotationID is only creatable from AnnMgr.
|
||||||
|
explicit inline AnnotationID(unsigned i) : ID(i) {}
|
||||||
public:
|
public:
|
||||||
inline AnnotationID(const AnnotationID &A) : ID(A.ID) {}
|
inline AnnotationID(const AnnotationID &A) : ID(A.ID) {}
|
||||||
|
|
||||||
@ -67,7 +69,7 @@ class Annotation {
|
|||||||
AnnotationID ID; // ID number, as obtained from AnnotationManager
|
AnnotationID ID; // ID number, as obtained from AnnotationManager
|
||||||
Annotation *Next; // The next annotation in the linked list
|
Annotation *Next; // The next annotation in the linked list
|
||||||
public:
|
public:
|
||||||
inline Annotation(AnnotationID id) : ID(id), Next(0) {}
|
explicit inline Annotation(AnnotationID id) : ID(id), Next(0) {}
|
||||||
virtual ~Annotation(); // Designed to be subclassed
|
virtual ~Annotation(); // Designed to be subclassed
|
||||||
|
|
||||||
// getID - Return the unique ID# of this annotation
|
// getID - Return the unique ID# of this annotation
|
||||||
|
@ -1316,7 +1316,7 @@ struct aliasopt {
|
|||||||
// exit is called.
|
// exit is called.
|
||||||
struct extrahelp {
|
struct extrahelp {
|
||||||
const char * morehelp;
|
const char * morehelp;
|
||||||
extrahelp(const char* help);
|
explicit extrahelp(const char* help);
|
||||||
};
|
};
|
||||||
|
|
||||||
void PrintVersionMessage();
|
void PrintVersionMessage();
|
||||||
|
@ -44,7 +44,7 @@ class ConstantRange {
|
|||||||
public:
|
public:
|
||||||
/// Initialize a full (the default) or empty set for the specified bit width.
|
/// Initialize a full (the default) or empty set for the specified bit width.
|
||||||
///
|
///
|
||||||
ConstantRange(uint32_t BitWidth, bool isFullSet = true);
|
explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true);
|
||||||
|
|
||||||
/// Initialize a range to hold the single specified value.
|
/// Initialize a range to hold the single specified value.
|
||||||
///
|
///
|
||||||
|
@ -262,7 +262,7 @@ class VISIBILITY_HIDDEN WorkListRemover :
|
|||||||
public SelectionDAG::DAGUpdateListener {
|
public SelectionDAG::DAGUpdateListener {
|
||||||
DAGCombiner &DC;
|
DAGCombiner &DC;
|
||||||
public:
|
public:
|
||||||
WorkListRemover(DAGCombiner &dc) : DC(dc) {}
|
explicit WorkListRemover(DAGCombiner &dc) : DC(dc) {}
|
||||||
|
|
||||||
virtual void NodeDeleted(SDNode *N) {
|
virtual void NodeDeleted(SDNode *N) {
|
||||||
DC.removeFromWorkList(N);
|
DC.removeFromWorkList(N);
|
||||||
|
@ -57,9 +57,9 @@ AnnotationID AnnotationManager::getID(const std::string &Name) { // Name -> ID
|
|||||||
IDMapType::iterator I = IDMap->find(Name);
|
IDMapType::iterator I = IDMap->find(Name);
|
||||||
if (I == IDMap->end()) {
|
if (I == IDMap->end()) {
|
||||||
(*IDMap)[Name] = IDCounter++; // Add a new element
|
(*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
|
// getID - Name -> ID + registration of a factory function for demand driven
|
||||||
|
@ -1112,7 +1112,7 @@ namespace {
|
|||||||
else if (isa<ConstantPointerNull>(V))
|
else if (isa<ConstantPointerNull>(V))
|
||||||
return ConstantRange(APInt::getNullValue(typeToWidth(V->getType())));
|
return ConstantRange(APInt::getNullValue(typeToWidth(V->getType())));
|
||||||
else
|
else
|
||||||
return typeToWidth(V->getType());
|
return ConstantRange(typeToWidth(V->getType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// typeToWidth - returns the number of bits necessary to store a value of
|
// typeToWidth - returns the number of bits necessary to store a value of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user