clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.


================
Comment at: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:404
-    // non-Apple platforms, but for now it is needed.
-    m_compiler->getLangOpts().ObjC = true;
     break;
----------------
A better way would be to try and grab the Objective C runtime from the process. 
There are some variants of objective C that might run under non-apple targets:

```
ProcessSP process_sp = target->GetProcess();
if (process_sp) 
  m_compiler->getLangOpts().ObjC = 
process_sp->GetLanguageRuntime(eLanguageTypeObjC) != nullptr;
```

Then C and C++ programs on Mac will be able to use "id" and other reserved 
words in their expressions again.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D54843



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to