From 770bfec9f0737f1ad272d1fc10ae173e635af004 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226775 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/DebugInfo.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h index 68d86d72a7d..c8c01def08d 100644 --- a/include/llvm/IR/DebugInfo.h +++ b/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