DIBuilder: Make header iterator constructor explicit, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-22 03:20:09 +00:00
parent db5a7969ce
commit 770bfec9f0

View File

@ -66,7 +66,7 @@ class DIHeaderFieldIterator
public:
DIHeaderFieldIterator() {}
DIHeaderFieldIterator(StringRef Header)
explicit DIHeaderFieldIterator(StringRef Header)
: Header(Header), Current(Header.slice(0, Header.find('\0'))) {}
StringRef operator*() const { return Current; }
const StringRef * operator->() const { return &Current; }
@ -200,8 +200,10 @@ public:
DIHeaderFieldIterator());
}
DIHeaderFieldIterator header_begin() const { return getHeader(); }
DIHeaderFieldIterator header_end() const { return StringRef(); }
DIHeaderFieldIterator header_begin() const {
return DIHeaderFieldIterator(getHeader());
}
DIHeaderFieldIterator header_end() const { return DIHeaderFieldIterator(); }
DIHeaderFieldIterator getHeaderIterator(unsigned Index) const {
// Since callers expect an empty string for out-of-range accesses, we can't