summaryrefslogtreecommitdiffstats
path: root/llvm/utils/emacs
Commit message (Collapse)AuthorAgeFilesLines
* Cleaning up LLVM IR mode for Emacs.Rafael Espindola2015-09-101-78/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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! llvm-svn: 247281
* Rename all references to old mailing lists to new lists.llvm.org address.Tanya Lattner2015-08-051-1/+1
| | | | llvm-svn: 243999
* [emacs] Get llvm-mode to font-lock "personality"Ramkumar Ramachandra2015-02-091-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D7494 llvm-svn: 228555
* Correcting keyword highlighting in llvm-mode.el.Rafael Espindola2015-02-061-12/+12
| | | | | | | | | 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! llvm-svn: 228396
* [emacs] llvm-mode: fix parens, font-lock i*Ramkumar Ramachandra2015-01-231-10/+3
| | | | | | | | | | | | | | | | 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 llvm-svn: 226931
* [emacs] Use c-mode-common-hook, derive from "gnu"Ramkumar Ramachandra2015-01-221-18/+6
| | | | | | | | | 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 llvm-svn: 226861
* IR: Add 'distinct' MDNodes to bitcode and assemblyDuncan P. N. Exon Smith2015-01-081-0/+2
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 225474
* Improvements to emacs packages for llvm and tablegen mode.Rafael Espindola2015-01-072-50/+64
| | | | | | | | | | | | | * 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. llvm-svn: 225356
* Improve emacs coding styleWill Newton2014-12-091-13/+8
| | | | | | | | | | | | | 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. llvm-svn: 223765
* IR: Implement uselistorder assembly directivesDuncan P. N. Exon Smith2014-08-191-0/+2
| | | | | | | | | | 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. llvm-svn: 216025
* [Emacs] Use spaces rather than tabs for indentation in tablegen-modeAdam Nemet2014-06-241-0/+1
| | | | llvm-svn: 211564
* Add addrspacecast instruction.Matt Arsenault2013-11-151-1/+1
| | | | | | Patch by Michele Scandale! llvm-svn: 194760
* Update emacs llvm mode.Matt Arsenault2013-11-141-4/+11
| | | | | | It seems this hasn't been done in a while. llvm-svn: 194650
* Remove 'deplibs' keyword, since it's no longer used.Bill Wendling2012-12-031-1/+1
| | | | llvm-svn: 169116
* Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmpMichael Ilseman2012-12-011-3/+4
| | | | llvm-svn: 169064
* Remove bad comma from .el file.Bill Wendling2012-02-221-1/+1
| | | | llvm-svn: 151189
* Add Foreach LoopDavid Greene2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 151164
* Remove MultidefsDavid Greene2011-10-071-1/+1
| | | | | | | | | | | | | | | | | | | 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" llvm-svn: 141378
* Emacs Support for MultidefsDavid Greene2011-10-051-1/+1
| | | | | | Add Emacs font-lock keyword support for multidefs. llvm-svn: 141237
* Using regexp-opt for keyword regex declarations makes the word lists moreMisha Brukman2010-09-192-14/+17
| | | | | | readable and easier to edit. llvm-svn: 114308
* .llx is no more.Chris Lattner2009-12-191-1/+1
| | | | llvm-svn: 91784
* Set comment string, patch by Johnny Chen!Chris Lattner2009-10-211-0/+2
| | | | llvm-svn: 84743
* Tweak LLVM emacs style to make default namespace indentation closer to styleDaniel Dunbar2009-07-281-2/+5
| | | | | | guide. llvm-svn: 77331
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 66339
* .emacs file bits for automatically setting the llvm.org coding style. ↵Mike Stump2009-03-041-0/+24
| | | | | | Thanks Anton. llvm-svn: 66032
* 'Previously, the emacs tablegen mode would highlight constants even if Chris Lattner2008-07-231-4/+4
| | | | | | | | | | 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! llvm-svn: 53944
* Modified to support comments better.Bill Wendling2007-12-191-53/+42
| | | | llvm-svn: 45192
* Reverting 44702. It wasn't correct to rename them.Bill Wendling2007-12-081-19/+19
| | | | llvm-svn: 44727
* Update this file for 2.0 syntax. Contributed by Jan RehdersAnton Korobeynikov2007-10-191-11/+12
| | | | llvm-svn: 43182
* Add better support for keywords.Bill Wendling2007-03-271-21/+40
| | | | llvm-svn: 35386
* Change llvm.cs.uiuc.edu -> llvm.orgReid Spencer2006-03-141-1/+1
| | | | llvm-svn: 26750
* Convert llvm.cs.uiuc.edu -> llvm.orgReid Spencer2006-03-142-2/+2
| | | | llvm-svn: 26748
* add support for fastcc and friendsChris Lattner2005-05-131-1/+1
| | | | llvm-svn: 21979
* Hilight tailChris Lattner2005-05-061-1/+1
| | | | llvm-svn: 21726
* elisp code to help with LLVM code standards complianceMisha Brukman2005-04-241-0/+12
| | | | llvm-svn: 21497
* Add support for undef and unreachableChris Lattner2004-10-161-2/+2
| | | | llvm-svn: 17059
* * Add `deplibs' keyword for specifying a list of dependent librariesMisha Brukman2004-09-281-4/+4
| | | | | | * Convert tabs to spaces llvm-svn: 16558
* Added `zeroinitializer' keyword.Misha Brukman2004-04-281-1/+1
| | | | llvm-svn: 13253
* Teach emacs about the select instructionChris Lattner2004-03-121-1/+1
| | | | llvm-svn: 12326
* Make sure to syntax hilight the 'unwind' keyword!Chris Lattner2003-10-271-1/+1
| | | | llvm-svn: 9524
* Syntax highlight the new operatorsChris Lattner2003-10-211-1/+1
| | | | llvm-svn: 9328
* Add support for the weak linkage specifierChris Lattner2003-10-101-1/+1
| | | | llvm-svn: 9000
* Syntax hilightChris Lattner2003-09-081-1/+1
| | | | llvm-svn: 8396
* * Added (X)Emacs mode for TableGen description filesMisha Brukman2003-08-113-1/+142
| | | | | | | * Added README that describes how to use the mode files * Associated files with .llx extension with llvm-mode llvm-svn: 7738
* Removing personal name from source code.Misha Brukman2003-06-031-1/+1
| | | | llvm-svn: 6558
* Added the `to' keyword as in `cast <type> <data> to <type>'.Misha Brukman2003-06-031-7/+4
| | | | | | Cleaned up the header of the file (comments/description/etc). llvm-svn: 6557
* Add support for new va_arg instructionChris Lattner2003-05-081-1/+1
| | | | llvm-svn: 6026
* Update to add new keywordsChris Lattner2003-04-221-2/+2
| | | | llvm-svn: 5846
* Add missing keyword, add new linkage keywordsChris Lattner2003-04-161-1/+1
| | | | llvm-svn: 5785
* Added a major mode for Emacs to edit LLVM assembler code with syntaxMisha Brukman2002-10-091-0/+130
highlighting. llvm-svn: 4092
OpenPOWER on IntegriCloud