From a695258ed452831dd32cc6dbd953fafc3f33ba69 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 22 Jan 2015 03:20:09 +0000 Subject: [PATCH] DIBuilder: Make header iterator constructor explicit, NFC llvm-svn: 226775 --- llvm/include/llvm/IR/DebugInfo.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h index 68d86d7..c8c01de 100644 --- a/llvm/include/llvm/IR/DebugInfo.h +++ b/llvm/include/llvm/IR/DebugInfo.h @@ -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 -- 2.7.4