In the script that's used by RPC to convert LLDB headers to LLDB RPC headers, there's a bug with how it converts namespace usage. An overeager regex pattern caused *all* text before any `lldb::` namespace usage to get replaced with `lldb_rpc::` instead of just the namespace itself. This commit changes that regex pattern to be less overeager and modifies one of the shell tests for this script to actually check that the namespace usage replacement is working correctly. rdar://154126268
21 lines
917 B
C++
21 lines
917 B
C++
// This is a truncated version of lldb-enumerations.h used to test that the script
|
|
// convert-lldb-header-to-rpc-header.py works correctly. The script changes LLDB references in
|
|
// the original file to RPC references.
|
|
|
|
// The include guard should change from LLDB_LLDB to LLDB_RPC.
|
|
// LLDB_LLDB_ENUMERATIONS_H -> LLDB_RPC_ENUMERATIONS_H
|
|
#ifndef LLDB_LLDB_ENUMERATIONS_H
|
|
#define LLDB_LLDB_ENUMERATIONS_H
|
|
|
|
// The namespace definition should change to the lldb_rpc namespace, so should the comment that closes it:
|
|
// namespace lldb -> namespace lldb_rpc
|
|
namespace lldb {} // namespace lldb
|
|
|
|
// When the lldb namespace is used, the namespace must be replaced with lldb_rpc.
|
|
void dummyFunction(lldb::addr_t) {}
|
|
|
|
// The comment that closes the include guard must change in the same way
|
|
// the original guard did:
|
|
// #endif // LLDB_LLDB_ENUMERATIONS_H -> #endif // LLDB_RPC_ENUMERATIONS_H
|
|
#endif // LLDB_LLDB_ENUMERATIONS_H
|