diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2014-01-31 23:46:14 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2014-01-31 23:46:14 +0000 |
commit | cb6684b63b3c4c5a90e194c5719bc82690180f30 (patch) | |
tree | b436db0df9f0c8d4f88b046f928a951fbf23cfff /lib/LineEditor/Makefile | |
parent | bef2236283c333f17613b2ea4904878228fedb6e (diff) | |
download | llvm-cb6684b63b3c4c5a90e194c5719bc82690180f30.tar.gz llvm-cb6684b63b3c4c5a90e194c5719bc82690180f30.tar.bz2 llvm-cb6684b63b3c4c5a90e194c5719bc82690180f30.tar.xz |
Introduce line editor library.
This library will be used by clang-query. I can imagine LLDB becoming another
client of this library, so I think LLVM is a sensible place for it to live.
It wraps libedit, and adds tab completion support.
The code is loosely based on the line editor bits in LLDB, with a few
improvements:
- Polymorphism for retrieving the list of tab completions, based on
the concept pattern from the new pass manager.
- Tab completion doesn't corrupt terminal output if the input covers
multiple lines. Unfortunately this can only be done in a truly horrible
way, as far as I can tell. But since the alternative is to implement our
own line editor (which I don't think LLVM should be in the business of
doing, at least for now) I think it may be acceptable.
- Includes a fallback for the case where the user doesn't have libedit
installed.
Note that this uses C stdio, mainly because libedit also uses C stdio.
Differential Revision: http://llvm-reviews.chandlerc.com/D2200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LineEditor/Makefile')
-rw-r--r-- | lib/LineEditor/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/LineEditor/Makefile b/lib/LineEditor/Makefile new file mode 100644 index 0000000000..c7ff6d8eaa --- /dev/null +++ b/lib/LineEditor/Makefile @@ -0,0 +1,15 @@ +##===- lib/LineEditor/Makefile -----------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = ../.. +LIBRARYNAME = LLVMLineEditor +BUILD_ARCHIVE := 1 + +include $(LEVEL)/Makefile.common + |