by respecting the "artificial" attribute on variables. Function arguments that are artificial and useful to end-users are being whitelisted by the language runtime.
Details
- Reviewers
jingham - Commits
- rZORGc19d7fb3883e: Hide runtime support values such as clang's __vla_expr from frame variable
rZORG64147a341796: Hide runtime support values such as clang's __vla_expr from frame variable
rGc19d7fb3883e: Hide runtime support values such as clang's __vla_expr from frame variable
rG64147a341796: Hide runtime support values such as clang's __vla_expr from frame variable
rG1db0f0ca988f: Hide runtime support values such as clang's __vla_expr from frame variable
rLLDB359841: Hide runtime support values such as clang's __vla_expr from frame variable
rL359841: Hide runtime support values such as clang's __vla_expr from frame variable
Diff Detail
- Repository
- rL LLVM
Event Timeline
Could you add a comment (probably best in LanguageRuntime.h) saying what a RuntimeSupportValue is?
Also, so far as I can tell, this patch works because we use the CPP language runtime for C++ methods is an ObjC++ file, and the ObjCLanguageRuntime for ObjC methods in ditto. That is surely the right thing to do, but it would be good to ensure that there's a test that asserts this behavior. I'm sure there must be but didn't see on a quick scan. Can you make sure there's such tests and if not add one?
Done.
Also, so far as I can tell, this patch works because we use the CPP language runtime for C++ methods is an ObjC++ file, and the ObjCLanguageRuntime for ObjC methods in ditto. That is surely the right thing to do, but it would be good to ensure that there's a test that asserts this behavior. I'm sure there must be but didn't see on a quick scan. Can you make sure there's such tests and if not add one?
I'm not sure what exactly you want me to test there. Can you elaborate?
Thanks you! There was indeed a bug that prevented us from recognizing the correct runtime for the C++ this pointer.
I think there is a problem with this patch. I don't believe the TestVLA part would work on any non-darwin platform (it doesn't on linux: http://lab.llvm.org:8014/builders/lldb-x86_64-debian/builds/923), and it works on darwin only accidentally.
The reason the fails on linux is that we don't have a "language runtime" plugin for the "C" language, so there is noone to ask if the variable is a runtime support value, and so we return false from ValueObject::IsRuntimeSupportValue. I believe the reason this works on darwin is because ValueObject::IsRuntimeSupportValue has a fallback (not sure why) which explicitly asks for the ObjC runtime if the desired language is not present. On linux, we don't have an ObjC runtime..
I can think of a couple of solutions here (adding a C language runtime, defaulting to return IsArtificial in ValueObject if no language runtime is present) but none of them seemed too obvious to commit straight-away, so I've disabled a part of that test for the time being (r359867). Nonetheless, could you please take a look at this problem?