[Lldb-commits] [PATCH] D64545: [lldb] Don't use __FUNCTION__ as a file name

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 10 22:41:31 PDT 2019


teemperor created this revision.
teemperor added a reviewer: davide.
Herald added subscribers: lldb-commits, abidh.
Herald added a project: LLDB.

I saw while debugging that we call this file `ParseInternal`, which is not a very good name for our
fake expression file and also adds this unnecessary link between the way we name this function
and the other source location names we get from the expression parser. This patch is renaming
it to `<lldb-expr>` which is closer to the way Clang names its buffers, it doesn't depend on the
function name (which changes when I refactor this code) and it's easier to grep for.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D64545

Files:
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp


Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -920,7 +920,7 @@
 
   if (!created_main_file) {
     std::unique_ptr<MemoryBuffer> memory_buffer =
-        MemoryBuffer::getMemBufferCopy(expr_text, __FUNCTION__);
+        MemoryBuffer::getMemBufferCopy(expr_text, "<lldb-expr>");
     source_mgr.setMainFileID(source_mgr.createFileID(std::move(memory_buffer)));
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64545.209124.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190711/1efaa8bb/attachment.bin>


More information about the lldb-commits mailing list