[PATCH] D138658: [DebugInfo] Protect DIFile::Source against empty string

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 06:33:55 PST 2022


probinson added a comment.

> A zero-length file isn't valid in C++ (you have to have a newline at the end)

LLVM is used for many languages, and they might not all have that requirement.  Also, I just tried running `clang -c -g` on a zero-length file; it didn't issue any diagnostics at all, and produced an object file (although it did not have any debug-info sections).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138658/new/

https://reviews.llvm.org/D138658



More information about the llvm-commits mailing list