[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

Jonas Devlieghere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 3 08:02:43 PDT 2018


JDevlieghere added a comment.

@jingham is this safe to land?



================
Comment at: lib/CodeGen/CGDebugInfo.cpp:2992
+      std::string NameString = Name.str();
+      llvm::raw_string_ostream ParameterizedName(NameString);
+      ParameterizedName << "<";
----------------
ormris wrote:
> JDevlieghere wrote:
> > Why not use Name.str() directly?
> I got "error: invalid initialization of non-const reference ... from rvalue ...". Using NameString fixed the issue.
Right, makes sense, you're using the string as the buffer :-) 


Repository:
  rC Clang

https://reviews.llvm.org/D44842





More information about the cfe-commits mailing list