Commit Graph

91210 Commits

Author SHA1 Message Date
Douglas Gregor 2b88c115f9 Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.

llvm-svn: 113319
2010-09-08 00:15:04 +00:00
Greg Clayton d003a778d9 Added an objective C test that creates some NSString, NSArray and NSDictionary
objects and populates them so we can test making expression calls with these
objects. We will need to make this test case more complete as time goes on to
make sure we can evaluate all functions.

llvm-svn: 113314
2010-09-07 23:55:31 +00:00
Greg Clayton e83e731ec1 Remove the Flags member in lldb_private::Module in favor of bitfield boolean
member variables.

Modified lldb_private::Module to have an accessor that can be used to tell if
a module is a dynamic link editor (dyld) as there are functions in dyld on
darwin that mirror functions in libc (malloc, free, etc) that should not
be used when doing function lookups by name in expressions if there are more
than one match when looking up functions by name.

llvm-svn: 113313
2010-09-07 23:40:05 +00:00
Howard Hinnant 331b3dd2ad has_trivial_copy_assign hooked up to clang (without workarounds). Filed http://llvm.org/bugs/show_bug.cgi?id=8109 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library.
llvm-svn: 113312
2010-09-07 23:38:59 +00:00
Jim Ingham a767c9a3ae The settings mutexes get used recursively, and deadlock if they are normal mutexes.
llvm-svn: 113309
2010-09-07 23:31:30 +00:00
Fariborz Jahanian 366a94822b Local static block variable referecned in its
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).

llvm-svn: 113307
2010-09-07 23:26:17 +00:00
Owen Anderson a4d9c78aa1 Add a separate unrolling threshold when the current function is being optimized for size.
The threshold value of 50 is arbitrary, and I chose it simply by analogy to the inlining thresholds, where
the baseline unrolling threshold is slightly smaller than the baseline inlining threshold.  This could
undoubtedly use some tuning.

llvm-svn: 113306
2010-09-07 23:15:30 +00:00
Howard Hinnant bfc4026f4c Made a stab at has_copy_constructor. Got it mostly working for g++-4.0, but only works for scalar types on clang. Ultimately this needs a compiler-supported is_constructible which clang is missing, and won't be able to use until it gets variadic templates.
llvm-svn: 113304
2010-09-07 23:11:28 +00:00
John McCall 978f007a80 Add documentation for llvm-diff.
llvm-svn: 113303
2010-09-07 23:10:21 +00:00
Daniel Dunbar 53c9ac30f9 tests: Use -ffreestanding when including stdint.h, to avoid platform dependencies.
llvm-svn: 113301
2010-09-07 22:54:28 +00:00
Sean Callanan 1e87fffb41 Fixed a bug where we did not handle constant
expressions correctly.  These produced a result
variable with an initializer but no store
instruction, and the store instruction was as
a result never rewritten to become a store to a
persistent variable.

Now if the result variable has an initializer
but is never used, we generate a (redundant)
store instruction for it, which is then later
rewritten into a (useful) store to the persistent
result variable.

llvm-svn: 113300
2010-09-07 22:43:19 +00:00
Jakob Stoklund Olesen 4d19d2651d Don't add <imp-def> operands during register rewriting.
LiveIntervals already adds <imp-def> operands for super-registers when a subreg
def defines the whole register. Thus, it is not necessary to do it again when
rewriting.

In fact, the super-register imp-defs caused miscompilations because the late
scheduler couldn't see that the super-register was read.

We still add super-reg <imp-use,kill> operands when rewriting virtuals to
physicals.

llvm-svn: 113299
2010-09-07 22:38:45 +00:00
Caroline Tice 3f4c09c1c3 Small help text fixes, to make it more consistent and accurate.
Temporarily remove -l option from 'expr' command (at Sean's request).

llvm-svn: 113298
2010-09-07 22:38:08 +00:00
Jim Grosbach 88628e9738 To shrink a t2LDM instruction to the 16-bit wide tLDM instruction, the base
register must be one of the destination registers for the load. Otherwise,
the tLDM instruction will write-back to the base register, which isn't what's
desired (otherwise, we'd have a t2LDM_UPD instead).

rdar://8394087

llvm-svn: 113297
2010-09-07 22:30:53 +00:00
Ted Kremenek 41994fd45d Fix DeclPrinter to not include '=' in printing when no initializer is provided for a VarDecl. Patch by Jim Goodnow II!
llvm-svn: 113296
2010-09-07 22:21:59 +00:00
Gabor Greif 7af952801e typo
llvm-svn: 113295
2010-09-07 22:17:12 +00:00
Howard Hinnant 06fc97019a has_nothrow_copy_constructor hooked up to clang. Filed http://llvm.org/bugs/show_bug.cgi?id=8107 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library.
llvm-svn: 113294
2010-09-07 22:09:07 +00:00
Devang Patel 3f4abf397c remove these tests for now.
llvm-svn: 113293
2010-09-07 22:03:44 +00:00
Greg Clayton 8dc0a9879c Stop line entries from dumping full paths when addresses dump themselves as symbol contexts.
llvm-svn: 113292
2010-09-07 21:56:53 +00:00
Douglas Gregor 0744ef6371 Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.

llvm-svn: 113291
2010-09-07 21:49:58 +00:00
Sean Callanan 3883b5ae4e Improved function lookup to avoid conflicts between
symbols with the same name and no debug information.
Also improved the way functions are called so we
don't automatically define them as variadic functions
in the IR.

llvm-svn: 113290
2010-09-07 21:49:41 +00:00
Jim Grosbach 9877af3b46 grammar tweak
llvm-svn: 113289
2010-09-07 21:30:25 +00:00
Sean Callanan d0d37d1800 Updated the x86_64 and i386 ABIs to chain RBP
(i.e., leave the value the same, so that a new
stack frame will be linked to the previous
stack) rather than zeroing out RBP.

This fixes calls to dlopen(), for example, which
does a backtrace to see which image is calling
it.

llvm-svn: 113288
2010-09-07 21:23:34 +00:00
Bill Wendling 9040eecb49 Remove untrue comments.
llvm-svn: 113287
2010-09-07 21:07:59 +00:00
Bruno Cardoso Lopes 6b1d62c529 Factor out some x86 vector shuffle rewriting and add comments about the direction the shuffle lowering is heading to
llvm-svn: 113286
2010-09-07 21:03:14 +00:00
Devang Patel b0af23a1f6 There is no need to force target if the test is going to run on other x86 platforms.
llvm-svn: 113285
2010-09-07 20:59:09 +00:00
Owen Anderson 866e516ead Remove dead code. ManagedCleanup is unused, and contained a serious bug in that
the provided cleanup function is never actually called.

llvm-svn: 113284
2010-09-07 20:53:39 +00:00
Owen Anderson d12ea002b8 Fix PR7972, in which the PassRegistry was being leaked. As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.

llvm-svn: 113283
2010-09-07 20:48:10 +00:00
Ted Kremenek aba4958db2 Fix null pointer dereference in StreamChecker::Fseek (reported in PR 8081) and simplify surrounding checking logic.
llvm-svn: 113282
2010-09-07 20:45:26 +00:00
Stuart Hastings 420c8a604f Typo. Thanks to BillW for pointing it out!
llvm-svn: 113281
2010-09-07 20:39:07 +00:00
Dan Gohman 9afd666faf Tidy up the getModRefInfo declarations.
llvm-svn: 113275
2010-09-07 20:37:47 +00:00
Howard Hinnant 01fd31000b has_trivial_copy_constructor hooked up to clang. Filed http://llvm.org/bugs/show_bug.cgi?id=8105 to take care of void, arrays of incomplete bounds and complete bounds which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle them in the library.
llvm-svn: 113270
2010-09-07 20:31:18 +00:00
Tom Care bc9eaef24c Re-enabled truncation/extension checking in IdempotentOperationChecker and added a test case.
llvm-svn: 113269
2010-09-07 20:27:56 +00:00
Jim Ingham 95852755a8 Move common code from GetSettingsController in Process & Debugger into static functions
in UserSettingsController.cpp.

llvm-svn: 113268
2010-09-07 20:27:09 +00:00
Bruno Cardoso Lopes 7c483028fb Move code around to prepare for moving some of the logic together to another function
llvm-svn: 113267
2010-09-07 20:20:27 +00:00
Douglas Gregor e9b76c2a41 Add function attributes to the output of -ast-print-xml, from Martin Vejnar!
llvm-svn: 113266
2010-09-07 20:16:43 +00:00
Owen Anderson 29ed9459d0 Properly initialize the pImpl member of PassRegistry to zero.
llvm-svn: 113264
2010-09-07 20:13:48 +00:00
Greg Clayton 2bddd3442f Patch from Jay Cornwall that modifies the LLDB "Host" layer to reuse more
code between linux, darwin and BSD.

llvm-svn: 113263
2010-09-07 20:11:56 +00:00
Owen Anderson 3c8019c94d Add doxygen comments for PassRegistry.
llvm-svn: 113262
2010-09-07 20:04:26 +00:00
Bill Wendling 353802114f Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
llvm-svn: 113261
2010-09-07 20:03:56 +00:00
Chris Lattner 6e27b3e004 Fix a serious performance regression introduced by r108687 on linux:
turning (fptrunc (sqrt (fpext x))) -> (sqrtf x)  is great, but we have
to delete the original sqrt as well.  Not doing so causes us to do 
two sqrt's when building with -fmath-errno (the default on linux).

llvm-svn: 113260
2010-09-07 20:01:38 +00:00
Evan Cheng 5444b36e01 Remove a dead comment.
llvm-svn: 113259
2010-09-07 20:01:10 +00:00
Chris Lattner 29570bd695 rename test.
llvm-svn: 113257
2010-09-07 19:57:06 +00:00
Fariborz Jahanian 535618b927 get rid of a warning.
llvm-svn: 113256
2010-09-07 19:57:04 +00:00
Chris Lattner 091012d5d5 hopefully fix a problem building on cygwin-1.5
llvm-svn: 113255
2010-09-07 19:50:53 +00:00
Fariborz Jahanian 56603ef7b2 Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.

llvm-svn: 113253
2010-09-07 19:38:13 +00:00
Owen Anderson a74fa15f32 Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.

llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Johnny Chen ea772bbba0 The output for term-width setting has single quotes around the (int) value.
And added a trace output for the stop function name to breakAfterLaunch() method.

llvm-svn: 113251
2010-09-07 18:55:50 +00:00
Bill Wendling 02b701f558 Fix whitespace, because I'm OCD.
llvm-svn: 113250
2010-09-07 18:49:14 +00:00
Stuart Hastings a3188a81c0 Test case for r113248. Raar 8361341.
llvm-svn: 113249
2010-09-07 18:43:57 +00:00