Alexander Kornienko
70bc5f1398
Fixed/added namespace ending comments using clang-tidy. NFC
...
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
2015-06-19 15:57:42 +00:00
Yaron Keren
75e0c4b060
Remove superfluous .str() and replace std::string concatenation with Twine.
...
llvm-svn: 233392
2015-03-27 17:51:30 +00:00
Rafael Espindola
3fd1e9933f
Modernize raw_fd_ostream's constructor a bit.
...
Take a StringRef instead of a "const char *".
Take a "std::error_code &" instead of a "std::string &" for error.
A create static method would be even better, but this patch is already a bit too
big.
llvm-svn: 216393
2014-08-25 18:16:47 +00:00
Eric Christopher
650c8f2a06
Clean up language and grammar.
...
Based on a patch by jfcaron3@gmail.com !
PR19806
llvm-svn: 209216
2014-05-20 17:11:11 +00:00
Benjamin Kramer
d59664f4f7
raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary.
...
llvm-svn: 207593
2014-04-29 23:26:49 +00:00
Craig Topper
9f008867c0
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
...
llvm-svn: 206243
2014-04-15 04:59:12 +00:00
Craig Topper
e9ba759c81
[C++11] Add 'override' keyword to virtual methods that override their base class.
...
llvm-svn: 202945
2014-03-05 07:30:04 +00:00
Rafael Espindola
90c7f1cc16
Replace the F_Binary flag with a F_Text one.
...
After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)
llvm-svn: 202052
2014-02-24 18:20:12 +00:00
Rafael Espindola
7dbcdd08c2
Don't make F_None the default.
...
This will make it easier to switch the default to being binary files.
llvm-svn: 202042
2014-02-24 15:07:20 +00:00
Chandler Carruth
ed0881b2a6
Use the new script to sort the includes of every file under lib.
...
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.
Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]
llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Benjamin Kramer
1f97a5a671
Remove all remaining uses of Value::getNameStr().
...
llvm-svn: 144648
2011-11-15 16:27:03 +00:00
Benjamin Kramer
4c93d15f09
Twinify GraphWriter a little bit.
...
llvm-svn: 144647
2011-11-15 16:26:38 +00:00
Owen Anderson
6c18d1aac0
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
...
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Owen Anderson
df7a4f2515
Now with fewer extraneous semicolons!
...
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Chris Lattner
65b48b5dfc
zap dead code.
...
llvm-svn: 113073
2010-09-04 18:12:00 +00:00
Owen Anderson
d31d82d75c
Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.
...
llvm-svn: 111815
2010-08-23 17:52:01 +00:00
Owen Anderson
a7aed18624
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
bda59bd247
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
755aceb5d0
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
...
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Owen Anderson
ac4a1ede17
Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with RegisterAnalysisGroup<> for pass registration.
...
llvm-svn: 109058
2010-07-21 23:07:00 +00:00
Owen Anderson
a57b97e7e7
Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
...
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Nick Lewycky
974e12b2d3
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
02d5f77d26
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Chris Lattner
da42426e04
make DOTGraphTraits public, patch by Tobias Grosser!
...
llvm-svn: 84396
2009-10-18 04:09:11 +00:00
Duncan Sands
1636b7ef47
The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".
...
It prints the content of all bbs, instead of printing empty bbs to make the
CFG more readable. Fix this. Patch by Tobias Grosser.
llvm-svn: 82315
2009-09-19 11:25:44 +00:00
Dan Gohman
61a8796ddb
Make LLVM command-line tools overwrite their output files without -f.
...
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".
Add a -f option to llvm-extract and llvm-link, for consistency.
Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.
Update Makefiles and documentation accordingly.
llvm-svn: 79990
2009-08-25 15:34:52 +00:00
Chris Lattner
4883d90396
convert LoopInfo.h and GraphWriter.h to use raw_ostream
...
llvm-svn: 79836
2009-08-23 07:19:13 +00:00
Chris Lattner
1362602eb2
Change Pass::print to take a raw ostream instead of std::ostream,
...
update all code that this affects.
llvm-svn: 79830
2009-08-23 06:03:38 +00:00
Chris Lattner
b25de3ff60
eliminate the "Value" printing methods that print to a std::ostream.
...
This required converting a bunch of stuff off DOUT and other cleanups.
llvm-svn: 79819
2009-08-23 04:37:46 +00:00
Daniel Dunbar
12368685d8
Switch to getNameStr().
...
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Owen Anderson
b70adf2b92
Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
...
Update other uses in the codebase for this change.
llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Duncan Sands
9c40c28926
Rationalize the names of passes that print information:
...
-callgraph => print-callgraph
-callscc => print-callgraph-sccs
-cfgscc => print-cfg-sccs
-externalfnconstants => print-externalfnconstants
-print => print-function
-print-alias-sets (no change)
-print-callgraph => dot-callgraph
-print-cfg => dot-cfg
-print-cfg-only => dot-cfg-only
-print-dom-info (no change)
-printm => print-module
-printusedtypes => print-used-types
llvm-svn: 56487
2008-09-23 12:47:39 +00:00
Dan Gohman
a79db30d28
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Dan Gohman
d78c400b5b
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Devang Patel
80e43fa744
Restore isCFGOnly property of various analysis passes.
...
llvm-svn: 48579
2008-03-20 02:25:21 +00:00
Devang Patel
718da668ab
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Devang Patel
af75ab8130
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Devang Patel
864970e9b6
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Dan Gohman
1eb8ed47f5
Add explicit keywords.
...
llvm-svn: 37839
2007-07-02 14:53:37 +00:00
Devang Patel
3e6519e9fa
Fix PR 1497
...
Use separate pass id for CFGOnlyPrinter.
llvm-svn: 37439
2007-06-05 20:24:36 +00:00
Dan Gohman
90d97ac1e6
Add passes -view-cfg and -view-cfg-only that are like -print-cfg and
...
-print-cfg-only except they use the ViewCFG function, which displays the
CFG rendered with graphviz with gv.
llvm-svn: 37033
2007-05-14 14:25:08 +00:00
Nick Lewycky
e7da2d6ac3
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
e95c6ad802
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Reid Spencer
f75727ab14
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
...
LLVM's footprint and speed up linking.
llvm-svn: 33941
2007-02-05 23:42:17 +00:00
Bill Wendling
f3baad3ee1
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
...
now cerr, cout, and NullStream resp.
llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
edcc8c2f8b
Remove the 'printname' argument to WriteAsOperand. It is always true, and
...
passing false would make the asmprinter fail anyway.
llvm-svn: 32264
2006-12-06 06:16:21 +00:00
Bill Wendling
597d451fea
Removed some of the iostream #includes. Moved towards converting to using
...
llvm streams
llvm-svn: 31983
2006-11-28 22:46:12 +00:00