[Lldb-commits] [lldb] r365812 - [lldb] Don't use __FUNCTION__ as a file name
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 11 12:26:55 PDT 2019
Author: teemperor
Date: Thu Jul 11 12:26:55 2019
New Revision: 365812
URL: http://llvm.org/viewvc/llvm-project?rev=365812&view=rev
Log:
[lldb] Don't use __FUNCTION__ as a file name
Summary:
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.
Reviewers: davide
Reviewed By: davide
Subscribers: abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D64545
Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=365812&r1=365811&r2=365812&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Thu Jul 11 12:26:55 2019
@@ -920,7 +920,7 @@ ClangExpressionParser::ParseInternal(Dia
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)));
}
More information about the lldb-commits
mailing list