Commit Graph

124539 Commits

Author SHA1 Message Date
Fariborz Jahanian 0740ed9835 fixes the diagnostic issued in // rdar://11069896
llvm-svn: 153217
2012-03-21 20:28:39 +00:00
Chad Rosier b57321ad3d Report the natural alignment of unsigned long long, not the preferred alignment.
rdar://11054144

llvm-svn: 153216
2012-03-21 20:20:47 +00:00
Jan Sjödin 1b12e5ea36 Fix windows compilation warning. Patch by Micah.
llvm-svn: 153215
2012-03-21 20:00:30 +00:00
Nico Weber 6a2eee0cfb Try to get cpath.c passing on windows, using lit's new ${pathsep} variable.
llvm-svn: 153214
2012-03-21 19:57:21 +00:00
Nico Weber d998e8450e Add a ${pathsep} variable to lit that expands to : (or ; on win32).
This is in braces so that it doesn't conflict with the existing %p.
It uses braces instead of parens because parens would have to be
regex-escaped.

llvm-svn: 153213
2012-03-21 19:56:42 +00:00
Anna Zaks fc2e153444 [analyzer] Malloc: Utter the name of the leaked variable.
Specifically, we use the last store of the leaked symbol in the leak diagnostic.
(No support for struct fields since the malloc checker doesn't track those
yet.)

+ Infrastructure to track the regions used in store evaluations.
This approach is more precise than iterating the store to
obtain the region bound to the symbol, which is used in RetainCount
checker. The region corresponds to what is uttered in the code in the
last store and we do not rely on the store implementation to support
this functionality.

llvm-svn: 153212
2012-03-21 19:45:08 +00:00
Anna Zaks 6797d6ee23 [analyser] Factor out FindUniqueBinding from RetainCount checker.
So that others could use it as well. No functionality change.

llvm-svn: 153211
2012-03-21 19:45:01 +00:00
Anna Zaks d42e828720 [analyzer] Re-enable the test disabled by r152969.
(The fix was committed in r152982.)

llvm-svn: 153210
2012-03-21 19:44:57 +00:00
Danil Malyshev 25753cd972 (no commit message)
llvm-svn: 153208
2012-03-21 19:13:08 +00:00
Danil Malyshev 6bb72d12db Missed getPointerToNamedFunction() declaration.
llvm-svn: 153207
2012-03-21 18:47:10 +00:00
Johnny Chen 72ee62e030 Add missing watchpoint stop info creation logic for arm on the debugger side.
WIP for rdar://problem/9667960

llvm-svn: 153206
2012-03-21 18:28:25 +00:00
Danil Malyshev 02fc6e86a6 Based on this discussion: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138477.html
1. Declare a virtual function getPointerToNamedFunction() in JITMemoryManager
2. Move the implementation of getPointerToNamedFunction() form JIT/MCJIT to DefaultJITMemoryManager.

llvm-svn: 153205
2012-03-21 18:26:47 +00:00
Johnny Chen 907c233591 Add "frame info" command to the "Examining Thread State" section, as suggested by Andrew Trick.
llvm-svn: 153204
2012-03-21 18:14:37 +00:00
Jim Grosbach e13adc38d0 Checking a build_vector for an all-ones value.
Type legalization can zero-extend the elements of the build_vector node, so,
for example, we may have an <8 x i8> with i32 elements of value 255. That
should return 'true' for the vector being all ones.

llvm-svn: 153203
2012-03-21 17:48:04 +00:00
Bob Wilson 7f05ca38e4 Duplicated code is bad. At least make it consistent.
The getARMTargetCPU and getLLVMArchSuffixForARM functions exist in both
Toolchain.cpp and Tools.cpp.  This stuff needs a thorough overhaul.  In the
meantime, this patch at least makes them consistent.  One version had been
converted to use StringSwitch, and the other version had new Cortex M-series
processors added.

llvm-svn: 153202
2012-03-21 17:19:12 +00:00
Sean Callanan e2d4748ae3 Added some hardening to make sure that we don't
use QualType contents unchecked.

llvm-svn: 153201
2012-03-21 17:13:20 +00:00
Fariborz Jahanian 3ba24bab1c Allow void blocks to return witn a void expression in
c-mode to match behavior with void functions in c. Issue
warning with -pedantic. // rdar://11069896

llvm-svn: 153200
2012-03-21 16:45:13 +00:00
Sean Callanan 8ce585f8f1 Added a local patch to reflect an LLVM fix for
relocations (LLVM revision 153147).  Now when
we report section locations in the target process,
LLVM will apply both those relocations whose
targets are in that section and those relocations
which reside in that section and point to other
sections.

llvm-svn: 153199
2012-03-21 16:42:08 +00:00
Bob Wilson cc4ab9d9c0 For Darwin, do not let -mcpu override the -arch option. <rdar://11059238>
On Darwin the architecture and the corresponding Mach-O slice is typically
specified with -arch.  If not, it defaults to the current host architecture.
Do not use -mcpu to override the -arch value.  This is only an issue when
people need to use specialized code for a non-default CPU (hopefully guarded
by run-time checks to detect the current processor).  The -mcpu option is
still used for the -target-cpu option to clang, but this patch causes it to
not be used to set the architecture in the target triple.

llvm-svn: 153197
2012-03-21 16:31:37 +00:00
Fariborz Jahanian eb4eb5cad9 modern objective-c rewriter: remove 'const' from
pointer field declarations in several meta-data.
// rdar://11079898

llvm-svn: 153196
2012-03-21 16:23:16 +00:00
Patrick Beard 5e0bccf2d0 Removed repeated word (of of).
llvm-svn: 153195
2012-03-21 16:22:53 +00:00
Howard Hinnant cb16c68042 It appears that the standard accidentally removed the default constructor for error_category. I'm putting it back in. This fixes http://llvm.org/bugs/show_bug.cgi?id=12321.
llvm-svn: 153194
2012-03-21 16:18:57 +00:00
Fariborz Jahanian e9de728afc Undo previous patch as I checked more than I intended.
llvm-svn: 153193
2012-03-21 16:18:21 +00:00
Fariborz Jahanian fbe392eed6 modern objective-c rewriter: remove 'const' from
pointer field declarations in several meta-data.
// rdar://11079898

llvm-svn: 153192
2012-03-21 16:17:22 +00:00
Kostya Serebryany 3f56851f5c [asan] extend the test for long double bug
llvm-svn: 153190
2012-03-21 15:29:28 +00:00
Kostya Serebryany 84a7f2e8e9 [asan] fix one more bug related to long double
llvm-svn: 153189
2012-03-21 15:28:50 +00:00
Alexey Samsonov b8a047261c [asan] one more try to remove pthread.h from asan_interceptors.cc
llvm-svn: 153188
2012-03-21 15:02:39 +00:00
Alexey Samsonov 9113f3e000 [asan] add missing declarations from string.h and remove this header
llvm-svn: 153187
2012-03-21 14:33:15 +00:00
Alexey Samsonov abbcccc187 [asan] use extern declaraions of libc functions on Win and on Mac
llvm-svn: 153186
2012-03-21 14:22:28 +00:00
Joerg Sonnenberger a29b5bd2a8 Put Is64BitMemOperand into !defined(NDEBUG) for now.
llvm-svn: 153185
2012-03-21 14:09:26 +00:00
Benjamin Kramer bc1066734f Use a signed value for this enum to avoid spuriuos warnings from gcc.
llvm-svn: 153184
2012-03-21 13:48:11 +00:00
Alexey Samsonov ef50dfd6aa [asan]: remove signal.h system header from interceptors
llvm-svn: 153183
2012-03-21 13:44:39 +00:00
Alexey Samsonov 8ada45553d [asan]: substitute extern decls with system header in asan_mac.cc
llvm-svn: 153182
2012-03-21 13:00:04 +00:00
Alexey Samsonov 9ce04b0c36 [asan] merge mac-specific interceptors into one function
llvm-svn: 153180
2012-03-21 12:42:00 +00:00
Alexey Samsonov 5f7048b396 [asan]: remove asan_mac.h
llvm-svn: 153179
2012-03-21 12:29:54 +00:00
Alexey Samsonov 1d4145380e [asan]: start removing os-specific asan_mac.h - move inclusion of mac system header to asan_mac.cc
llvm-svn: 153178
2012-03-21 12:03:44 +00:00
Evgeniy Stepanov 823085a8f4 [asan] Support for %z to Printf()
At the moment, asan internal Printf() uses %l modifier for printing
values of size_t and related types. This works, because we control
both the implementation of Printf and all its uses, but can be a
little misleading.

This change adds support for %z to Printf(). All callers that print
sizes and pointers as integers are switched to %zu / %zx.

llvm-svn: 153177
2012-03-21 11:32:46 +00:00
Chandler Carruth 3ffccb3802 Teach instsimplify to gracefully degrade in the presence of instructions
not attched to a basic block or function. There are conservatively
correct answers in these cases, and this makes the analysis more useful
in contexts where we have a partially formed bit of IR.

I don't have any way to test this directly... suggestions welcome here,
but I'm not seeing anything sadly. I only found this using a subsequent
patch to the inliner which runs instsimplify on partially inlined
instructions, and even then only on a quite large program. I never got
a reasonable testcase out of it, and anything I do get is likely to be
quite fragile due to requiring an interaction of two different passes,
and the only result being a segfault if it goes wrong.

llvm-svn: 153176
2012-03-21 10:58:47 +00:00
Alexander Potapenko 1159250518 s/Printf/Report for libc interceptors (need this to debug the potential double interception)
llvm-svn: 153175
2012-03-21 09:33:05 +00:00
Anders Waldenborg b766e2490d [python] Add some paths where to find test binary
Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there
Adds /lib/i386-linux-gnu for systems that does multiarch (debian)

llvm-svn: 153174
2012-03-21 08:34:58 +00:00
Anders Waldenborg 87b1d460f9 [python] Mark get_test_binary as not being a test
get_test_binary is a helper method, not a test, make sure nosetests
doesn't pick it up as a test.

llvm-svn: 153173
2012-03-21 08:18:19 +00:00
NAKAMURA Takumi 98b18777a4 lit/TestRunner.py: [Win32] Rework WinWaitReleased() again! "win32file" from Python Win32 Extensions.
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.

Disable win32file at ImportError. Thanks to Francois to let me know.

FIXME: Could we report warning or notification if win32file were not found?
llvm-svn: 153172
2012-03-21 07:49:44 +00:00
Gregory Szorc 52d2660441 Finish organizing C API docs.
Remaining "uncategorized" functions have been organized into their
proper place in the hierarchy. Some functions were moved around so
groups are defined together.

No code changes were made.

llvm-svn: 153169
2012-03-21 07:28:27 +00:00
John McCall b6c4a7ef21 For the annals of subtle but terrible bugs: fix a longstanding bug
in vtable layout where virtual methods inherited from virtual bases
could be assigned the same vcall adjustment slot if they shared
a name and parameter signature but differed in their
cv-qualification.  The code was already trying to handle this
case, but unfortunately used the ordinary type qualifiers
(which are always empty here) instead of the method qualifiers.
This seems like something that the API should discourage, but
I don't know how to carry that principle out in this instance.

Eliminate this function's need for an ASTContext while we're at it.

This bug affects the ABI, and fixing it brings us into accord with
the Itanium ABI (and GCC's implementation of it), but, obviously,
technically breaks full compatibility with previous releases of Clang.
Just letting you know.

llvm-svn: 153168
2012-03-21 06:57:19 +00:00
NAKAMURA Takumi a4917fade7 clang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.
llvm-svn: 153167
2012-03-21 06:25:42 +00:00
Joerg Sonnenberger 5463e66768 Fix generation of the address size override prefix. Add assertions for
the invalid cases. At least 16bit operand in 64bit mode is currently not
rejected in the parser.

llvm-svn: 153166
2012-03-21 05:48:07 +00:00
Andrew Trick e357cfa3db I meant to disable this test, not XFAIL it
llvm-svn: 153165
2012-03-21 05:18:53 +00:00
Greg Clayton 2af282a16b Fixed the ability to load a module from a path by using just a UUID. After
the migration to ModuleSpec objects this broke and is now fixed.

Also fixed a case in the darwin kernel dynamic loader where we just need to
trust the load address of the kernel if we can't read it from memory.

llvm-svn: 153164
2012-03-21 04:25:00 +00:00
Andrew Trick f0a517fec8 misched: beginning to add unit tests
llvm-svn: 153163
2012-03-21 04:12:19 +00:00
Andrew Trick 25baeca54d misched: fix LiveInterval update for bottom-up scheduling
llvm-svn: 153162
2012-03-21 04:12:16 +00:00