David Blaikie
bbafb8a745
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
...
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
2012-03-11 07:00:24 +00:00
Dylan Noblesmith
2c1dd2716a
Basic: import SmallString<> into clang namespace
...
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
2012-02-05 02:13:05 +00:00
Chris Lattner
0e62c1cc0b
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Jay Foad
9a6b09874d
Make more use of llvm::StringRef in various APIs. In particular, don't
...
use the deprecated forms of llvm::StringMap::GetOrCreateValue().
llvm-svn: 133515
2011-06-21 15:13:30 +00:00
Argyrios Kyrtzidis
11e6f0a6c3
Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it.
...
Allow remapping a file by specifying another filename whose contents should be loaded if the original
file gets loaded. This allows to override files without having to create & load buffers in advance.
llvm-svn: 127052
2011-03-05 01:03:53 +00:00
Peter Collingbourne
2f1e36bfd0
Rename tok::eom to tok::eod.
...
The previous name was inaccurate as this token in fact appears at
the end of every preprocessing directive, not just macro definitions.
No functionality change, except for a diagnostic tweak.
llvm-svn: 126631
2011-02-28 02:37:51 +00:00
Abramo Bagnara
ea4f7c7761
Introduced raw_identifier token kind.
...
llvm-svn: 122394
2010-12-22 08:23:18 +00:00
Michael J. Spencer
740857fa10
Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.
...
llvm-svn: 122340
2010-12-21 16:45:57 +00:00
Michael J. Spencer
f28df4cdba
Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
...
llvm-svn: 122087
2010-12-17 21:22:22 +00:00
Michael J. Spencer
8aaf49959c
Merge System into Support.
...
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
Chris Lattner
dd278430a3
change the 'is directory' indicator to be a null-or-not
...
pointer that is passed down through the APIs, and make
FileSystemStatCache::get be the one that filters out
directory lookups that hit files. This also paves the
way to have stat queries be able to return opened files.
llvm-svn: 120060
2010-11-23 21:17:56 +00:00
Chris Lattner
8f0583daa2
simplify the cache miss handling code, eliminating CacheMissing.
...
llvm-svn: 120038
2010-11-23 20:05:15 +00:00
Chris Lattner
226efd356c
rework the stat cache, pulling it out of FileManager.h into
...
its own header and giving it some more structure. No
functionality change.
llvm-svn: 120030
2010-11-23 19:19:34 +00:00
Chris Lattner
9795b39113
zap dead code.
...
llvm-svn: 113074
2010-09-04 18:12:20 +00:00
Ted Kremenek
fee882ac95
PTH generation: Don't save the leading '#' token in a null directive. This unbreaks using PTH with Boost (<rdar://problem/8227989>).
...
llvm-svn: 109484
2010-07-27 02:58:57 +00:00
Chris Lattner
fb24a3a4ec
push some source location information down through the compiler,
...
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.
llvm-svn: 101939
2010-04-20 20:35:58 +00:00
Kovarththanan Rajaratnam
5497e49ae4
Make some typedefs private
...
llvm-svn: 98817
2010-03-18 07:45:30 +00:00
Kovarththanan Rajaratnam
3fd8082ff5
Rename variable to indicate what it is being used for
...
llvm-svn: 98816
2010-03-18 07:18:10 +00:00
Douglas Gregor
4ad3da2843
Entering the main source file in the preprocessor can fail if the
...
source file has been changed. Handle that failure more gracefully.
llvm-svn: 98727
2010-03-17 15:44:30 +00:00
Douglas Gregor
874cc62876
Use SourceManager's Diagnostic object for all file-reading errors,
...
simplifying the SourceManager interfaces somewhat.
llvm-svn: 98598
2010-03-16 00:35:39 +00:00
Kovarththanan Rajaratnam
b4c0f5cc79
Add EmitString helper method
...
llvm-svn: 98488
2010-03-14 08:35:19 +00:00
Kovarththanan Rajaratnam
d3fa9721fb
Unbreak last commit. This should have been part of r98478.
...
llvm-svn: 98480
2010-03-14 07:55:43 +00:00
Kovarththanan Rajaratnam
fb0762057e
Pass file string by reference
...
llvm-svn: 98478
2010-03-14 07:38:15 +00:00
Kovarththanan Rajaratnam
a9c81a8848
Use makeAbsolute()
...
llvm-svn: 98472
2010-03-14 07:06:50 +00:00
Kovarththanan Rajaratnam
b65a14802c
Move to anonymous namespace
...
llvm-svn: 98469
2010-03-14 06:48:05 +00:00
Kovarththanan Rajaratnam
e5f1c197af
No need to call setIdentifierInfo() after LookUpIdentifierInfo() which LookUpIdentifierInfo() will automatically do
...
llvm-svn: 98435
2010-03-13 08:53:33 +00:00
Kovarththanan Rajaratnam
7a67f67823
Don't rely on implicit conversion
...
llvm-svn: 97916
2010-03-07 11:21:46 +00:00
Kovarththanan Rajaratnam
3c36a6669a
Use clang::io::Emit8
...
llvm-svn: 97810
2010-03-05 15:40:54 +00:00
Kovarththanan Rajaratnam
daca645655
Move Emit24 to clang::io
...
llvm-svn: 97569
2010-03-02 17:41:26 +00:00
Mike Stump
281d6d7745
Use the llvm coding convention for indentation for switch.
...
llvm-svn: 93966
2010-01-20 02:03:14 +00:00
Chris Lattner
710bb87147
Fix PR5633 by making the preprocessor handle the case where we can
...
stat a file but where mmaping it fails. In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'
instead of "cannot find file".
llvm-svn: 90110
2009-11-30 04:18:44 +00:00
Benjamin Kramer
16634c2c5a
Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.
...
llvm-svn: 90033
2009-11-28 10:07:24 +00:00
Daniel Dunbar
07d0785dbb
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
...
are updated.
llvm-svn: 84447
2009-10-18 21:17:35 +00:00
Daniel Dunbar
2c422dc9ca
Move clients to use IdentifierInfo::getNameStart() instead of getName()
...
llvm-svn: 84436
2009-10-18 20:26:12 +00:00
Daniel Dunbar
283ccf4342
Use StringExtra's HashString instead of BernsteinHash.
...
llvm-svn: 84360
2009-10-17 20:43:58 +00:00
Douglas Gregor
d2eb58abac
Add support for a chain of stat caches in the FileManager, rather than
...
only supporting a single stat cache. The immediate benefit of this
change is that we can now generate a PCH/AST file when including
another PCH file; in the future, the chain of stat caches will likely
be useful with multiple levels of PCH files.
llvm-svn: 84263
2009-10-16 18:18:30 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Chris Lattner
3441b4f77e
API changes to match llvm ToT.
...
llvm-svn: 79868
2009-08-23 22:45:33 +00:00
Benjamin Kramer
89b422c118
Replace cerr with errs().
...
llvm-svn: 79854
2009-08-23 12:08:50 +00:00
Eli Friedman
16b7b6f511
Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
...
files to lib/Frontend.
llvm-svn: 72099
2009-05-19 04:14:29 +00:00