summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SymbolRewriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing spaceFangrui Song2018-07-301-1/+1
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338293
* Mark all library options as hidden.Zachary Turner2017-12-011-1/+2
| | | | | | | | | | | | | | | | | These command line options are not intended for public use, and often don't even make sense in the context of a particular tool anyway. About 90% of them are already hidden, but when people add new options they forget to hide them, so if you were to make a brand new tool today, link against one of LLVM's libraries, and run tool -help you would get a bunch of junk that doesn't make sense for the tool you're writing. This patch hides these options. The real solution is to not have libraries defining command line options, but that's a much larger effort and not something I'm prepared to take on. Differential Revision: https://reviews.llvm.org/D40674 llvm-svn: 319505
* [Transforms] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-10-111-41/+60
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 315516
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* [PM] Port SymbolRewriter to the new PMMichael Kuperstein2016-07-251-22/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D22703 llvm-svn: 276687
* Attempt to pacify windows bots.Michael Kuperstein2016-07-251-13/+13
| | | | llvm-svn: 276672
* Don't use iplist in SymbolRewriter. NFC.Michael Kuperstein2016-07-251-10/+15
| | | | | | | | There didn't appear to be a good reason to use iplist in this case, a regular list of unique_ptr works just as well. Change made in preparation to a new PM port (since iplist is not moveable). llvm-svn: 276668
* Make some headers self-contained, remove unused includes that violate layering.Benjamin Kramer2016-01-271-1/+0
| | | | llvm-svn: 258937
* Remove unnecessary includesMatt Arsenault2015-08-081-1/+0
| | | | llvm-svn: 244382
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* Purge unused includes throughout libSupport.Benjamin Kramer2015-03-231-0/+1
| | | | | | NFC. llvm-svn: 232976
* SymbolRewriter: Hide implementation detailsBenjamin Kramer2015-03-091-6/+6
| | | | | | NFC. llvm-svn: 231660
* [PM] Remove the old 'PassManager.h' header file at the top level ofChandler Carruth2015-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | LLVM's include tree and the use of using declarations to hide the 'legacy' namespace for the old pass manager. This undoes the primary modules-hostile change I made to keep out-of-tree targets building. I sent an email inquiring about whether this would be reasonable to do at this phase and people seemed fine with it, so making it a reality. This should allow us to start bootstrapping with modules to a certain extent along with making it easier to mix and match headers in general. The updates to any code for users of LLVM are very mechanical. Switch from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h". Qualify the types which now produce compile errors with "legacy::". The most common ones are "PassManager", "PassManagerBase", and "FunctionPassManager". llvm-svn: 229094
* SymbolRewriter: allow rewriting with comdatsSaleem Abdulrasool2015-01-271-0/+20
| | | | | | | | | COMDATs must be identically named to the symbol. When support for COMDATs was introduced, the symbol rewriter was not updated, resulting in rewriting failing for symbols which were placed into COMDATs. This corrects the behaviour and adds test cases for this. llvm-svn: 227261
* SymbolRewriter: prevent unnecessary rewriteSaleem Abdulrasool2015-01-271-0/+3
| | | | | | | The rewrite for the pattern based rewrite is unnecessary if the existing name matches the pattern. llvm-svn: 227260
* SymbolRewriter: use iplist::spliceSaleem Abdulrasool2015-01-051-1/+1
| | | | | | | | The swap implementation for iplist is currently unsupported. Simply splice the old list into place, which achieves the same purpose. This is needed in order to thread the -frewrite-map-file frontend option correctly. NFC. llvm-svn: 225186
* SymbolRewriter: 80-columnSaleem Abdulrasool2015-01-051-2/+4
| | | | | | Wrap a couple of lines. NFC. llvm-svn: 225185
* Remove redundant virtual on overriden functions.David Blaikie2014-11-141-1/+1
| | | | llvm-svn: 222023
* Fix extra semicolon warning. NFC.Vasileios Kalintiris2014-11-101-1/+1
| | | | llvm-svn: 221613
* Transforms: address some late commentsSaleem Abdulrasool2014-11-081-30/+13
| | | | | | | | | | We already use the llvm namespace. Remove the unnecessary prefix. Use the StringRef::equals method to compare with C strings rather than instantiating std::strings. Addresses late review comments from David Majnemer. llvm-svn: 221564
* Transforms: use typedef rather than using aliasesSaleem Abdulrasool2014-11-071-26/+25
| | | | | | | | Visual Studio 2012 apparently does not support using alias declarations. Use the more traditional typedef approach. This should let the Windows buildbots pass. NFC. llvm-svn: 221554
* Transform: add SymbolRewriter passSaleem Abdulrasool2014-11-071-0/+543
This introduces the symbol rewriter. This is an IR->IR transformation that is implemented as a CodeGenPrepare pass. This allows for the transparent adjustment of the symbols during compilation. It provides a clean, simple, elegant solution for symbol inter-positioning. This technique is often used, such as in the various sanitizers and performance analysis. The control of this is via a custom YAML syntax map file that indicates source to destination mapping, so as to avoid having the compiler to know the exact details of the source to destination transformations. llvm-svn: 221548
OpenPOWER on IntegriCloud