[PATCH] D42618: [LLVM-C] Add Accessors For A Module's Source File Name
Robert Widmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 10:48:35 PST 2018
CodaFi added inline comments.
================
Comment at: lib/IR/Core.cpp:240
+ *Len = Str.length();
+ return Str.c_str();
+}
----------------
whitequark wrote:
> Shouldn't the result be returned in a newly allocated buffer here?
The lifetime of the string for the source file name is tied to the module itself - just like the string for the module identifier. Non-owning references seem like the norm in the wrappers.
Repository:
rL LLVM
https://reviews.llvm.org/D42618
More information about the llvm-commits
mailing list