[llvm] r194681 - yaml::Input::mapTag(): Don't use StringRef to hold return type of std::string.

NAKAMURA Takumi geek4civic at gmail.com
Wed Nov 13 23:08:57 PST 2013


Author: chapuni
Date: Thu Nov 14 01:08:56 2013
New Revision: 194681

URL: http://llvm.org/viewvc/llvm-project?rev=194681&view=rev
Log:
yaml::Input::mapTag(): Don't use StringRef to hold return type of std::string.

Modified:
    llvm/trunk/lib/Support/YAMLTraits.cpp

Modified: llvm/trunk/lib/Support/YAMLTraits.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLTraits.cpp?rev=194681&r1=194680&r2=194681&view=diff
==============================================================================
--- llvm/trunk/lib/Support/YAMLTraits.cpp (original)
+++ llvm/trunk/lib/Support/YAMLTraits.cpp Thu Nov 14 01:08:56 2013
@@ -83,7 +83,7 @@ void Input::nextDocument() {
 }
 
 bool Input::mapTag(StringRef Tag, bool Default) {
-  StringRef foundTag = CurrentNode->_node->getVerbatimTag();
+  std::string foundTag = CurrentNode->_node->getVerbatimTag();
   if (foundTag.empty()) {
     // If no tag found and 'Tag' is the default, say it was found.
     return Default;





More information about the llvm-commits mailing list