Commit Graph

96315 Commits

Author SHA1 Message Date
Michael J. Spencer 02dd5544c4 google test depends on Support.
llvm-svn: 120105
2010-11-24 19:35:15 +00:00
Rafael Espindola 708ac4d6ad Relocate with the symbol if the relocation is of kind NTPOFF.
Patch by David Meyer, I added the test.

llvm-svn: 120104
2010-11-24 19:23:50 +00:00
Michael J. Spencer c33a41db85 unittests: Add initial Path-V2 test.
llvm-svn: 120103
2010-11-24 19:20:28 +00:00
Michael J. Spencer 96bcfcf2c2 Path Version 2.
Based on TR2/boost filesystem (v3) API, but modified to remove exceptions.

Do not include this file directly, when it is ready, it will be included by
include/llvm/System/Path.h.

llvm-svn: 120102
2010-11-24 19:20:19 +00:00
Michael J. Spencer 98847783f2 unittests: Add SystemTests.
llvm-svn: 120101
2010-11-24 19:20:05 +00:00
Rafael Espindola e98d483b71 Fix and add tests for all cases in x86 and x86_64 where gnu as implicitly
sets the type of a symbol to STT_TLS.

llvm-svn: 120100
2010-11-24 18:51:21 +00:00
Rafael Espindola af9a7a3e92 Testcase for r120017.
llvm-svn: 120099
2010-11-24 18:03:57 +00:00
Howard Hinnant 0c6a0fe7fb Add template alias emulation to <ratio>
llvm-svn: 120098
2010-11-24 17:05:06 +00:00
Wesley Peck 8ad3b25633 Updating MBlaze .mask and .frame directives to match GCC's output and fixing regression introduced in 120095 by checking MCStreamer::hasRawTextSupport.
llvm-svn: 120097
2010-11-24 16:32:35 +00:00
Wesley Peck 51917b868d 1. Fixing error where basic block labels were not being printed out when they need to be for the MBlaze backend because AsmPrinter::isBlockOnlyReachableByFallthrough does not take into account delay slots.
2. Re-adding .mask and .frame directives in printed assembly.
3. Adding .ent and .end directives in printed assembly.
4. Minor cleanups to MBlaze backend.

llvm-svn: 120095
2010-11-24 15:39:32 +00:00
Zhongxing Xu 8be65a792f 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

llvm-svn: 120094
2010-11-24 13:48:50 +00:00
Zhongxing Xu a1a9ba11b7 Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects.

llvm-svn: 120093
2010-11-24 13:08:51 +00:00
Kalle Raiskila e0a1d2b32c Use i8 as SETCC result type for i1 in SPU.
llvm-svn: 120092
2010-11-24 12:59:16 +00:00
John McCall f6d24ae091 Appease versions of GCC which don't correctly support injected class
names.

llvm-svn: 120091
2010-11-24 11:53:13 +00:00
Kalle Raiskila 97fc68774c Allow for 'fcmp ogt' in SPU.
Fix by Visa Putkinen!

llvm-svn: 120090
2010-11-24 11:42:17 +00:00
John McCall 2a80a9e3d3 This is probably an important file.
llvm-svn: 120089
2010-11-24 11:30:07 +00:00
John McCall 9b66c4bbbe 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.

llvm-svn: 120088
2010-11-24 11:21:45 +00:00
Zhongxing Xu cb29802198 Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().

llvm-svn: 120087
2010-11-24 08:53:20 +00:00
Zhongxing Xu 9b6e6b087f print asLValue attribute of CFGStmt.
llvm-svn: 120086
2010-11-24 06:33:02 +00:00
John McCall 086a464e24 Switch a lot of call-sites over to using the new value-kind calculations.
llvm-svn: 120084
2010-11-24 05:12:34 +00:00
Zhanyong Wan e2ea8bf945 Improve comments in Clang static analyzer, based on kremenek's
explanation on how things work there.  Reviewed by kremenek.

llvm-svn: 120081
2010-11-24 03:33:10 +00:00
Zhanyong Wan b5d11c127a Refactor AddStmtChoice to make it easier to use; also add comments on how the class works. Reviewed by kremenek.
llvm-svn: 120080
2010-11-24 03:28:53 +00:00
Francois Pichet 31ee8bfb0e 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.

llvm-svn: 120079
2010-11-24 03:07:43 +00:00
Rafael Espindola 4e70ac7b68 If a symbol is used as tls, mark it as tls even if not declare as so. Probably
fixes PR8659.

llvm-svn: 120076
2010-11-24 02:19:40 +00:00
Zhanyong Wan 8e82c6372a Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.
llvm-svn: 120073
2010-11-24 01:47:11 +00:00
NAKAMURA Takumi cf3475172f include/llvm/System/system_error.h: ECANCELED is undefined on Cygwin-1.5.
llvm-svn: 120072
2010-11-24 01:29:45 +00:00
Ted Kremenek b3b56c6bcd 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.

llvm-svn: 120071
2010-11-24 00:54:37 +00:00
Ted Kremenek 1ef52416c7 Tweak ImmutableMap/ImmutableSet/ImmutableList APIs
to use lowercase letters for the start of most
method names and to replace some method names
with more descriptive names (e.g., "getLeft()"
instead of "Left()").  No real functionality
change.

llvm-svn: 120070
2010-11-24 00:54:28 +00:00
Eli Friedman 9e7baae0c6 Unbreak clang-interpreter. (Should there be some automated testing for this?)
llvm-svn: 120069
2010-11-24 00:32:51 +00:00
Jakob Stoklund Olesen 00430319a8 Generalize overflowLeaf to also handle overflows in branch nodes.
This doesn't quite work yet because the calls to treeDecrement and treeIncrement
operate at the leaf level, not on pathNode(Level) as required.

llvm-svn: 120068
2010-11-24 00:03:32 +00:00
Chris Lattner 5ea7d07d2a 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.

llvm-svn: 120066
2010-11-23 22:32:37 +00:00
Chris Lattner 6bf4e6d8b2 add a MemoryBuffer::getOpenFile method, which turns an open
file descriptor into a MemoryBuffer (and closes the FD).

llvm-svn: 120065
2010-11-23 22:20:27 +00:00
Howard Hinnant e78881314a Update testsuite strucuture to latest draft
llvm-svn: 120064
2010-11-23 22:13:07 +00:00
John McCall 8a1013f8c3 Redeclarations of using declarations are not okay in function scopes.
Not sure what I was thinking before.

Fixes PR8668.

llvm-svn: 120063
2010-11-23 22:03:51 +00:00
Chris Lattner f77e11ba05 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.

llvm-svn: 120062
2010-11-23 21:53:56 +00:00
Chris Lattner 278038b4be hopefully resolve the windows buildbot issue (retch)
llvm-svn: 120061
2010-11-23 21:53:15 +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
Michael J. Spencer 5aef638057 system_error: Add fixme.
llvm-svn: 120059
2010-11-23 21:09:11 +00:00
Howard Hinnant b32f147bbf Update testsuite strucuture to latest draft
llvm-svn: 120058
2010-11-23 20:55:56 +00:00
Howard Hinnant fedfe3b69c Update testsuite strucuture to latest draft
llvm-svn: 120057
2010-11-23 20:55:36 +00:00
Chris Lattner 9624b695d2 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.

llvm-svn: 120056
2010-11-23 20:50:22 +00:00
John McCall feb624a435 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.

llvm-svn: 120055
2010-11-23 20:48:44 +00:00
Howard Hinnant ab7be6e43c Update testsuite strucuture to latest draft
llvm-svn: 120054
2010-11-23 20:47:09 +00:00
Peter Collingbourne e57e9ef9b7 Remove static_casts from SemaDeclAttr.cpp
llvm-svn: 120053
2010-11-23 20:45:58 +00:00
Howard Hinnant 53a3dfcf98 Update testsuite strucuture to latest draft
llvm-svn: 120052
2010-11-23 20:45:26 +00:00
Duncan Sands 0488d564e1 Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.
llvm-svn: 120051
2010-11-23 20:42:39 +00:00
Howard Hinnant 2066341b0d Update testsuite strucuture to latest draft
llvm-svn: 120050
2010-11-23 20:41:07 +00:00
Benjamin Kramer 94a622af4c The srem -> urem transform is not safe for any divisor that's not a power of two.
E.g. -5 % 5 is 0 with srem and 1 with urem.

Also addresses Frits van Bommel's comments.

llvm-svn: 120049
2010-11-23 20:33:57 +00:00
Chris Lattner 966b25b938 tidy up code, add a comment about dir caching.
llvm-svn: 120048
2010-11-23 20:30:42 +00:00
Howard Hinnant 165e25c974 Update testsuite strucuture to latest draft
llvm-svn: 120047
2010-11-23 20:29:54 +00:00