[PATCH] D31315: Record command lines in objects built by clang, LLVM part
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 18:24:28 PDT 2017
george.burgess.iv added a comment.
Thanks for working on this!
Please add one or more tests for this new behavior.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:429
+ if (!Flags.empty())
+ Producer = StringRef(Producer.str() + " " + Flags.str());
+
----------------
Looks like we're creating a StringRef to a temporary string here, which will give us undefined behavior when we use it on line 431. Please see http://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringref-h .
https://reviews.llvm.org/D31315
More information about the llvm-commits
mailing list