]>
granicus.if.org Git - clang/log
Sebastian Redl [Fri, 26 Nov 2010 18:37:14 +0000 (18:37 +0000)]
Forgot a file in r120182
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 26 Nov 2010 16:28:07 +0000 (16:28 +0000)]
Allow access to non-static members without an object in sizeof expressions, in C++0x. Patch by Jakub Wieczorek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120182
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Nov 2010 10:57:22 +0000 (10:57 +0000)]
For internal consistency's sake, compute the value kind of a dependent cast
based on the known properties of the casted-to type. Fixes a crash on spirit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 09:14:07 +0000 (09:14 +0000)]
Do not use StripCasts() in this context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 09:07:38 +0000 (09:07 +0000)]
Should not use StripCasts() in this context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 08:52:48 +0000 (08:52 +0000)]
Rename CXXObjectRegion to CXXTempObjectRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 08:42:27 +0000 (08:42 +0000)]
fix a bug introduced in r120173.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 08:21:53 +0000 (08:21 +0000)]
Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 07:15:40 +0000 (07:15 +0000)]
Add a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 25 Nov 2010 18:51:59 +0000 (18:51 +0000)]
Add C++ header path for openSUSE 11.4.
Patch by İsmail Dönmez.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 25 Nov 2010 18:29:30 +0000 (18:29 +0000)]
Hide a bunch of symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 25 Nov 2010 17:32:32 +0000 (17:32 +0000)]
OpaquePtrs are POD-like.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 06:35:14 +0000 (06:35 +0000)]
For CFGAutomaticObjDtor, the type may be reference type, e.g., const A &c = A();
Also apply some new coding style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120144
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 03:18:57 +0000 (03:18 +0000)]
handle CXXFunctionalCastExpr in visitLValue and Environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120143
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 02:52:17 +0000 (02:52 +0000)]
Improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 02:07:24 +0000 (02:07 +0000)]
Add dump method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Nov 2010 01:59:35 +0000 (01:59 +0000)]
Begin work on actually laying out virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Nov 2010 01:52:05 +0000 (01:52 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Nov 2010 01:51:53 +0000 (01:51 +0000)]
Move isNearlyEmpty out into the ASTContext so it can be called from CodeGen as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 25 Nov 2010 01:15:00 +0000 (01:15 +0000)]
Basic: add log2{,f,l}, round{,f,l} builtins
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 25 Nov 2010 00:35:20 +0000 (00:35 +0000)]
Tie DefineVTablesUsed() in with recursive function instantiation so that we emit
a useful template instantiation stack. Fixes PR8640.
This also causes a slight change to where the "instantianted from" note shows up
in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but
that isn't directly the fault of this patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 23:20:19 +0000 (23:20 +0000)]
Remove the PrimaryBaseInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 23:12:57 +0000 (23:12 +0000)]
Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 23:04:03 +0000 (23:04 +0000)]
Move code off the primary base info iterator. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 22:55:48 +0000 (22:55 +0000)]
Use the newly added function in ASTRecordLayoutBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 22:55:29 +0000 (22:55 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120130
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 22:50:27 +0000 (22:50 +0000)]
Add CXXRecordDecl::getIndirectPrimaryBases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 21:53:50 +0000 (21:53 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 21:05:09 +0000 (21:05 +0000)]
Fix a (probably very old) regression where we weren't using the typedef name for anonymous tag types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 20:22:04 +0000 (20:22 +0000)]
Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 20:05:21 +0000 (20:05 +0000)]
Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:57:04 +0000 (19:57 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:52:29 +0000 (19:52 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:51:04 +0000 (19:51 +0000)]
Make CodeGenTypes::getCGRecordLayout compute the layout lazily if it doesn't exist. This matches ASTContext::getASTRecordLayout and is less confusing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:37:16 +0000 (19:37 +0000)]
CGRecordLayout types are always struct types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 13:48:50 +0000 (13:48 +0000)]
When getting CXXThisRegion from CXXMethodDecl, use the qualifiers. This is
to be consistent with the type of 'this' expr in the method.
此行及以下内容将会被忽略--
M test/Analysis/method-call.cpp
M include/clang/Checker/PathSensitive/GRExprEngine.h
M lib/Checker/GRCXXExprEngine.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 13:08:51 +0000 (13:08 +0000)]
Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120093
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 11:53:13 +0000 (11:53 +0000)]
Appease versions of GCC which don't correctly support injected class
names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120091
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 11:30:07 +0000 (11:30 +0000)]
This is probably an important file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120089
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 11:21:45 +0000 (11:21 +0000)]
Add -cc1 -ast-dump-xml, an excessively detailed XML dump of the internals
of the ASTs. Only available in assertions builds. No stability guarantee.
This is intended solely as a debugging tool. I'm not sure if the goals
are sufficiently aligned with the XML printer to allow a common
implementation.
Currently just falls back on the StmtDumper to display statements,
which means it doesn't produce valid XML in those cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 08:53:20 +0000 (08:53 +0000)]
Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 06:33:02 +0000 (06:33 +0000)]
print asLValue attribute of CFGStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120086
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 05:12:34 +0000 (05:12 +0000)]
Switch a lot of call-sites over to using the new value-kind calculations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 24 Nov 2010 03:33:10 +0000 (03:33 +0000)]
Improve comments in Clang static analyzer, based on kremenek's
explanation on how things work there. Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 24 Nov 2010 03:28:53 +0000 (03:28 +0000)]
Refactor AddStmtChoice to make it easier to use; also add comments on how the class works. Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120080
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 24 Nov 2010 03:07:43 +0000 (03:07 +0000)]
Fix 2 problems with Chris Lattner's FileManager redesign on Windows.
- FileEntry::operator= is needed on Win32.
- There was an error in the S_ISDIR() macro.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 24 Nov 2010 01:47:11 +0000 (01:47 +0000)]
Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Nov 2010 00:54:37 +0000 (00:54 +0000)]
Adjust method calls to reflect name changes in
ImmutableSet/ImmtuableMap/ImmutableList APIs.
Along the way, clean up some method names in
the static analyzer so that they are more
descriptive and/or start with lowercase letters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Nov 2010 00:32:51 +0000 (00:32 +0000)]
Unbreak clang-interpreter. (Should there be some automated testing for this?)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 22:32:37 +0000 (22:32 +0000)]
The final result of all this refactoring: instead of doing stat immediately
followed by an open for every source file we open, probe the file system with
'open' and then do an fstat when it succeeds. open+fstat is faster than
stat+open because the kernel only has to perform the string->inode mapping
once. Presumably it gets faster the deeper in your filesystem a lookup
happens.
For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on
my machine, a 7.7% speedup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120066
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 23 Nov 2010 22:03:51 +0000 (22:03 +0000)]
Redeclarations of using declarations are not okay in function scopes.
Not sure what I was thinking before.
Fixes PR8668.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 21:53:56 +0000 (21:53 +0000)]
if we succeed in opening a directory but expected a file, ensure we don't
leak a filedescriptor if a client ever starts returning one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 21:53:15 +0000 (21:53 +0000)]
hopefully resolve the windows buildbot issue (retch)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 21:17:56 +0000 (21:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 20:50:22 +0000 (20:50 +0000)]
pull "is directory" handling into FileManager::getStatValue
which simplifies clients and is important for future directions.
Add a FD member to FileEntry which isn't used but will be shortly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120056
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 23 Nov 2010 20:48:44 +0000 (20:48 +0000)]
A few tweaks to the value-kind computation:
- Default argument expressions pick up the value kind of the incoming
expression, not the value kind of the parameter it initializes.
- When building a template argument for substitution, A::x is an rvalue
if x is an instance method.
- Anonymous struct/union paths pick up value kind the same way that
normal member accesses do; extract out a common code path for this.
Enable the value-kind assertion, now that it passes self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 23 Nov 2010 20:45:58 +0000 (20:45 +0000)]
Remove static_casts from SemaDeclAttr.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 20:30:42 +0000 (20:30 +0000)]
tidy up code, add a comment about dir caching.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 20:07:39 +0000 (20:07 +0000)]
replicate a terrible hack to fix a build error on VC++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 20:05:15 +0000 (20:05 +0000)]
simplify the cache miss handling code, eliminating CacheMissing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 19:56:39 +0000 (19:56 +0000)]
factor the "cache miss" handling code out of FM into a static
method in FileSystemStatCache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 19:38:22 +0000 (19:38 +0000)]
r120013 dropped passing in the precomputed file size to
MemoryBuffer::getFile, causing us to pick up a fstat for
every file. Restore the optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 19:28:12 +0000 (19:28 +0000)]
PCH files only cache successful stats. Remove the code that reads/writes
the result code of the stat to/from the PCH file since it is always 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 19:19:34 +0000 (19:19 +0000)]
rework the stat cache, pulling it out of FileManager.h into
its own header and giving it some more structure. No
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120030
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 23 Nov 2010 10:15:48 +0000 (10:15 +0000)]
This test does not need to test the alignment of pointers. Make it pass
on 64-bit systems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 09:19:42 +0000 (09:19 +0000)]
tidy up. Split FileManager::getBufferForFile into
two copies, since they are fundamentally different
operations and the StringRef one should go away
(it shouldn't be part of FileManager at least).
Remove some dead arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 09:01:31 +0000 (09:01 +0000)]
don't allow remapping PTH file paths with -fworking-directory, the
client should just pass in absolute paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 08:50:03 +0000 (08:50 +0000)]
reduce indentation and use early outs, to make it easier to read
this code. no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 08:35:12 +0000 (08:35 +0000)]
now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code.
This also fixes a latent bug in ASTUnit where it would invoke
methods on FileManager without creating one in some code paths
in cindextext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 08:05:27 +0000 (08:05 +0000)]
make this file be self contained.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120008
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 07:51:02 +0000 (07:51 +0000)]
give FileManager a 'FileSystemOptions' ivar, which will be used
to simplify a bunch of code in it. It should ultimately get inlined
into FileManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 23 Nov 2010 07:15:13 +0000 (07:15 +0000)]
long => int to make the test pass on system where sizeof(long) = 64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Tue, 23 Nov 2010 06:43:05 +0000 (06:43 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 06:09:11 +0000 (06:09 +0000)]
Partially revert Doug's PCH validation patch (r98585).
This patch completely defeated the "passing in a prestat'd size
to MemoryBuffer" optimization, leading to an extra fstat call for
every buffer opened, in order to find out if the datestamp and size
of the file on disk matches what is in the stat cache.
I fully admit that I don't completely understand what is going on here:
why punish code when a stat cache isn't in use? what is the point of a
stat cache if you have to turn around and stat stuff to validate it?
To resolve both these issues, just drop the modtime check and check the
file size, which is the important thing anyway. This should also resolve
PR6812, because presumably windows is stable when it comes to file sizes.
If the modtime is actually important, we should get it and keep it on the
first stat.
This eliminates 833 fstat syscalls when processing Cocoa.h, speeding up
system time on -Eonly Cocoa.h from 0.041 to 0.038s.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120001
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 23 Nov 2010 06:07:27 +0000 (06:07 +0000)]
Microsoft C anonymous struct implementation.
Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 04:45:28 +0000 (04:45 +0000)]
stringref'ize API
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119997
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 04:40:26 +0000 (04:40 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 04:33:43 +0000 (04:33 +0000)]
avoid creating sys::Path instances when -fworking-directory isn't being used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119995
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Mon, 22 Nov 2010 19:32:14 +0000 (19:32 +0000)]
Stylistic changes to CFG.cpp:
1. "no 'else' after 'return'" -- this is for conformance with the
coding standards.
2. move 'else' to the line of the previous '}' -- this is for consistency.
Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Nov 2010 18:42:14 +0000 (18:42 +0000)]
Refactor the null-initialization for record types and make it handle bases that aren't i8 arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 22 Nov 2010 13:48:02 +0000 (13:48 +0000)]
Remove the other FIXME I added. This is covered by the Index test and not testable via -ast-dump.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 22 Nov 2010 13:12:28 +0000 (13:12 +0000)]
Remove one I just added, add a more focused test for why the current code is correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 22 Nov 2010 12:50:03 +0000 (12:50 +0000)]
Try to get the bots green after r119966.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 22 Nov 2010 10:30:56 +0000 (10:30 +0000)]
Fix the source range of CXXNewExprs. Fixes http://llvm.org/pr8661.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 22 Nov 2010 10:26:41 +0000 (10:26 +0000)]
Minor whitespace fix, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119965
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 22 Nov 2010 09:29:49 +0000 (09:29 +0000)]
test/Sema/x86-builtin-palignr.c: Now we can remove XFAIL:win32, according to r119958.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Mon, 22 Nov 2010 08:45:56 +0000 (08:45 +0000)]
Fix PR8419. Reviewed by kremenek and xuzhongxing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119960
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 22 Nov 2010 08:06:31 +0000 (08:06 +0000)]
Undo part of my previous commit to mm_malloc.h, going back to the use of
stdlib.h. There were numerous problems with forward declaring 'malloc' and
'free', but the most important is that these are reserved by POSIX and may be
implemented via a function-like macro.
As suggested by Dale Johannesen, I'm instead guarding the only include of this
in our builtin headers with __STDC_HOSTED__, and I've removed the include of
the header from the test suite. I'll discuss with folks whether we want to have
a hosted section of the test suite or not, and add it (and perhaps other tests)
back there if that's the direction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Nov 2010 00:03:08 +0000 (00:03 +0000)]
Remove FIXME; we don't ever want to lay out empty bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 21 Nov 2010 23:59:45 +0000 (23:59 +0000)]
Rename BaseLLVMType to NonVirtualBaseLLVMType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 21 Nov 2010 23:56:06 +0000 (23:56 +0000)]
Add getCGRecordLayout helper function. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 21 Nov 2010 23:25:35 +0000 (23:25 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 21 Nov 2010 18:34:21 +0000 (18:34 +0000)]
The 'X' printf type has a valid alternative form. Fixes PR8641.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 21 Nov 2010 18:33:34 +0000 (18:33 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 21 Nov 2010 14:11:41 +0000 (14:11 +0000)]
Fix a bunch of IndirectFieldDecl-related warnings.
- Negative ChainingSize doesn't make sense, make it unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 21 Nov 2010 11:32:22 +0000 (11:32 +0000)]
Filename.rfind("/\\") won't give us the position of the last directory seperator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 21 Nov 2010 09:55:08 +0000 (09:55 +0000)]
remove old compatibility APIs, use StringRef versions instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 21 Nov 2010 09:50:16 +0000 (09:50 +0000)]
change the various getFile routines to use StringRef as their implementation form.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 21 Nov 2010 06:49:41 +0000 (06:49 +0000)]
Fix warning: enumeration value 'IndirectField' not handled in switch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sun, 21 Nov 2010 06:22:53 +0000 (06:22 +0000)]
Compilation error: remove extra comma.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119921
91177308 -0d34-0410-b5e6-
96231b3b80d8