Fix the LLDB prompt for older Editline versions, specifically running on Ubuntu 12.04

llvm-svn: 201521
This commit is contained in:
Deepak Panickal 2014-02-17 17:42:25 +00:00
parent 549c514799
commit 0db9d32ff7
1 changed files with 5 additions and 0 deletions

View File

@ -67,8 +67,13 @@ Editline::Editline (const char *prog, // prog can't be NULL
assert (m_editline);
::el_set (m_editline, EL_CLIENTDATA, this);
// only defined for newer versions of editline
#ifdef EL_PROMPT_ESC
::el_set (m_editline, EL_PROMPT_ESC, GetPromptCallback, k_prompt_escape_char);
#else
// fall back on old prompt setting code
::el_set (m_editline, EL_PROMPT, GetPromptCallback);
#endif
::el_set (m_editline, EL_EDITOR, "emacs");
if (m_history)