summaryrefslogtreecommitdiff
path: root/utils/emacs
AgeCommit message (Collapse)Author
2015-09-10Cleaning up LLVM IR mode for Emacs.Rafael Espindola
I've made a range of improvements to the Emacs mode for LLVM IR. Most importantly, it changes llvm-mode to inherit from prog-mode. This means llvm-mode will be treated as a normal programming mode in Emacs, so many Emacs features will just work. prog-mode is new to Emacs 24, so I've added an alias to ensure compatibility with Emacs 23 too. I've changed the mode definition to use define-derived-mode. This saves us needing to set up local variables ourselves, and saves us needing to define llvm-mode-map, llvm-mode-abbrev-table, llvm-mode-map. I've removed the keybindings to tab-to-tab-stop, center-line and center-paragraph. This shouldn't be llvm-mode's responsibility, and the code didn't actually work anyway (since `(not llvm-mode-map)` always evaluated to `t`, the keybindings were never executed). I've simplified the syntax-table definition, it's equivalent (e.g. `"` is treated as string delimiter by default in Emacs). I've added `.` as a symbol constituent, so functions like `llvm.memset.p0i8.i32` are recognised as a single symbol. I've also changed `%` to be a symbol constituent, so users can move between words or symbols at their choice, rather than conflating the two. I've fixed regexp for types, which incorrect used `symbol` instead of `symbols` as an argument to `regexp-opt`. This was causing incorrect highlighting on lines like `call void @foovoid`. I've removed string and comment highlighting from `llvm-font-lock-keywords`. This is already handled by the syntax-table. Finally, I've removed the reference to jasmin. That project is long abandoned and the link 404s. For reference, I've found an old copy of the project here: https://github.com/stevej/emacs/blob/master/vendor/jasmin/jasmin.el Patch by Wilfred Hughes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247281 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05Rename all references to old mailing lists to new lists.llvm.org address.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09[emacs] Get llvm-mode to font-lock "personality"Ramkumar Ramachandra
Differential Revision: http://reviews.llvm.org/D7494 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228555 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06Correcting keyword highlighting in llvm-mode.el.Rafael Espindola
llvm-mode was previously confused when variable names contained keywords. This changes ensures that keywords are only highlighted when they're standalone. Patch by Wilfred Hughes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228396 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23[emacs] llvm-mode: fix parens, font-lock i*Ramkumar Ramachandra
In llvm-mode, with electric-pair-mode turned on, typing a literal '[' would print out '[[', and '(' would print a '(('. This was a very annoying bug caused by overzealous syntax-table entries: the parens are already part of the '(' and ')' class by default. Fix this. While at it, notice that i32, i64, i1 etc. are not font-locked despite a clear intent to do so. The issue is that regexp-opt doesn't accept regular expressions. So, spell out the common literal integers with different widths. Differential Revision: http://reviews.llvm.org/D7036 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226931 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[emacs] Use c-mode-common-hook, derive from "gnu"Ramkumar Ramachandra
Make it clear that the "llvm.org" style is deriving from "gnu" style, and use the c-mode-common-hook instead of c-mode-hook and c++-mode-hook. Differential Revision: http://reviews.llvm.org/D7035 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226861 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-08IR: Add 'distinct' MDNodes to bitcode and assemblyDuncan P. N. Exon Smith
Propagate whether `MDNode`s are 'distinct' through the other types of IR (assembly and bitcode). This adds the `distinct` keyword to assembly. Currently, no one actually calls `MDNode::getDistinct()`, so these nodes only get created for: - self-references, which are never uniqued, and - nodes whose operands are replaced that hit a uniquing collision. The concept of distinct nodes is still not quite first-class, since distinct-ness doesn't yet survive across `MapMetadata()`. Part of PR22111. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225474 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Improvements to emacs packages for llvm and tablegen mode.Rafael Espindola
* Both files have valid package headers and footers (you can verify with M-x checkdoc). * Fixed style warnings generated by checkdoc. * Fixed a byte-compiler warning in llvm-mode.el. * Ensure that the modes are autoloaded, so users do not need to (require 'llvm-mode) to use them. Patch by Wilfred Hughes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225356 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09Improve emacs coding styleWill Newton
Remove setting of default style, this way is not recommended and means that all the settings have to be duplicated to demonstrate the c-add-style method which is a much better way of doing it. Remove the modified date as it is better stored in SVN. Tweak a few style parameters to make them conform to the actual LLVM style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223765 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19IR: Implement uselistorder assembly directivesDuncan P. N. Exon Smith
Implement `uselistorder` and `uselistorder_bb` assembly directives, which allow the use-list order to be recovered when round-tripping to assembly. This is the bulk of PR20515. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216025 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-24[Emacs] Use spaces rather than tabs for indentation in tablegen-modeAdam Nemet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211564 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15Add addrspacecast instruction.Matt Arsenault
Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14Update emacs llvm mode.Matt Arsenault
It seems this hasn't been done in a while. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194650 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03Remove 'deplibs' keyword, since it's no longer used.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169116 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmpMichael Ilseman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169064 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22Remove bad comma from .el file.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151189 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22Add Foreach LoopDavid Greene
Add some data structures to represent for loops. These will be referenced during object processing to do any needed iteration and instantiation. Add foreach keyword support to the lexer. Add a mode to indicate that we're parsing a foreach loop. This allows the value parser to early-out when processing the foreach value list. Add a routine to parse foreach iteration declarations. This is separate from ParseDeclaration because the type of the named value (the iterator) doesn't match the type of the initializer value (the value list). It also needs to add two values to the foreach record: the iterator and the value list. Add parsing support for foreach. Add the code to process foreach loops and create defs based on iterator values. Allow foreach loops to be matched at the top level. When parsing an IDValue check if it is a foreach loop iterator for one of the active loops. If so, return a VarInit for it. Add Emacs keyword support for foreach. Add VIM keyword support for foreach. Add tests to check foreach operation. Add TableGen documentation for foreach. Support foreach with multiple objects. Support non-braced foreach body with one object. Do not require types for the foreach declaration. Assume the iterator type from the iteration list element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151164 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-07Remove MultidefsDavid Greene
Multidefs are a bit unwieldy and incomplete. Remove them in favor of another mechanism, probably for loops. Revert "Make Test More Thorough" Revert "Fix a typo." Revert "Vim Support for Multidefs" Revert "Emacs Support for Multidefs" Revert "Document Multidefs" Revert "Add a Multidef Test" Revert "Update Test for Multidefs" Revert "Process Multidefs" Revert "Parser Multidef Support" Revert "Lexer Support for Multidefs" Revert "Add Multidef Data Structures" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141378 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-05Emacs Support for MultidefsDavid Greene
Add Emacs font-lock keyword support for multidefs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-19Using regexp-opt for keyword regex declarations makes the word lists moreMisha Brukman
readable and easier to edit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114308 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19.llx is no more.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21Set comment string, patch by Johnny Chen!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28Tweak LLVM emacs style to make default namespace indentation closer to styleDaniel Dunbar
guide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77331 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-07Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands
and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04.emacs file bits for automatically setting the llvm.org coding style. ↵Mike Stump
Thanks Anton. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66032 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23'Previously, the emacs tablegen mode would highlight constants even if Chris Lattner
they appear in words. This would cause things like the "128" in "VR128" to be highlighted. This patch fixes the highlighting by only recognizing constants when they have word breaks around them.' Patch by Stefanus Du Toit! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Modified to support comments better.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45192 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-08Reverting 44702. It wasn't correct to rename them.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-19Update this file for 2.0 syntax. Contributed by Jan RehdersAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-27Add better support for keywords.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14Change llvm.cs.uiuc.edu -> llvm.orgReid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14Convert llvm.cs.uiuc.edu -> llvm.orgReid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13add support for fastcc and friendsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06Hilight tailChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21726 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24elisp code to help with LLVM code standards complianceMisha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21497 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16Add support for undef and unreachableChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17059 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28* Add `deplibs' keyword for specifying a list of dependent librariesMisha Brukman
* Convert tabs to spaces git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16558 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28Added `zeroinitializer' keyword.Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12Teach emacs about the select instructionChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27Make sure to syntax hilight the 'unwind' keyword!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9524 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21Syntax highlight the new operatorsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9328 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10Add support for the weak linkage specifierChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9000 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08Syntax hilightChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8396 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11* Added (X)Emacs mode for TableGen description filesMisha Brukman
* Added README that describes how to use the mode files * Associated files with .llx extension with llvm-mode git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7738 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03Removing personal name from source code.Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6558 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03Added the `to' keyword as in `cast <type> <data> to <type>'.Misha Brukman
Cleaned up the header of the file (comments/description/etc). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6557 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08Add support for new va_arg instructionChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6026 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22Update to add new keywordsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5846 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16Add missing keyword, add new linkage keywordsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5785 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09Added a major mode for Emacs to edit LLVM assembler code with syntaxMisha Brukman
highlighting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4092 91177308-0d34-0410-b5e6-96231b3b80d8