Devang Patel
ea84f59f5c
Add comment.
...
llvm-svn: 93434
2010-01-14 18:06:13 +00:00
Douglas Gregor
d2e6a45722
When qualified lookup into the current instantiation fails (because it
...
finds nothing), and the current instantiation has dependent base
classes, treat the qualified lookup as if it referred to an unknown
specialization. Fixes PR6031.
llvm-svn: 93433
2010-01-14 17:47:39 +00:00
Douglas Gregor
fc59ce1ea4
Switch a few callers of MaybeAddResult over to AddResult, when the
...
declarations we're adding do not need any name-hiding checks.
llvm-svn: 93431
2010-01-14 16:14:35 +00:00
Douglas Gregor
2b8162b7d0
Switch code-completion's ivar lookup over to LookupVisibleDecls,
...
eliminating yet one more ResultBuilder::MaybeAddResult caller.
llvm-svn: 93430
2010-01-14 16:08:12 +00:00
Douglas Gregor
78a210145b
Start migrating code-completion results from
...
ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult.
llvm-svn: 93429
2010-01-14 16:01:26 +00:00
Douglas Gregor
09bbc651f4
Switch the remaining code completions over to LookupVisibleDecls,
...
after adding the ability to determine whether our lookup is a
base-class lookup. Eliminate CollectMemberLookupResults, since it is
no longer used (yay).
llvm-svn: 93428
2010-01-14 15:47:35 +00:00
David Chisnall
035ead209f
Made ObjC method name mangling match GCC (which does it in a stupid and broken way that can give conflicts on method names containing underscores, but is needed for gdb to work because gdb does not know how to read ObjC class tables and relies on the mangling).
...
llvm-svn: 93427
2010-01-14 14:08:19 +00:00
Bill Wendling
22fe58e1b9
Use ENABLE_ASSERTIONS throughout.
...
llvm-svn: 93423
2010-01-14 10:19:55 +00:00
Zhongxing Xu
803ade2532
Fix pr6035.
...
llvm-svn: 93422
2010-01-14 03:45:06 +00:00
Douglas Gregor
200c99dd1e
Move code completion for qualified name lookup (foo::) to
...
LookupVisibleDecls. Also, a function does not hide another function.
llvm-svn: 93421
2010-01-14 03:35:48 +00:00
John McCall
4700099719
Improve overload diagnostics some more by calling out qualifier mismatches
...
for special diagnostics. Unfortunately, the non-overload diagnostics are not
this good.
llvm-svn: 93420
2010-01-14 03:28:57 +00:00
Douglas Gregor
a6e2edcc3a
Eliminate the code-completion-specifier CollectLookupResults in favor
...
of the more general LookupVisibleDecls.
llvm-svn: 93419
2010-01-14 03:27:13 +00:00
Douglas Gregor
6ae4c5278c
Simplify the code-completion logic for nested-name-specifiers: rather
...
than traversing visible declarations twice, only perform one traversal
and recognize nested-name-specifiers as special.
llvm-svn: 93418
2010-01-14 03:21:49 +00:00
Dan Gohman
dd5286dc63
Fix a codegen abort seen in 483.xalancbmk.
...
llvm-svn: 93417
2010-01-14 03:08:49 +00:00
Mike Stump
0a7d9305f1
Don't assume a random access iterator, instead just use CFG::iterator.
...
Thanks Ted.
llvm-svn: 93413
2010-01-14 02:45:29 +00:00
Anders Carlsson
5f9a881e1e
Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed.
...
llvm-svn: 93412
2010-01-14 02:29:07 +00:00
Mike Stump
29ce3a3114
Avoid snowballing errors into additional warnings. To do better, we'd
...
need an error term for the CFG. I suspect we'll always have to cope
with getCFG returning 0, though, I'd love to see even that possibility
removed.
llvm-svn: 93411
2010-01-14 02:26:52 +00:00
Evan Cheng
37463a7a58
Test for r93409.
...
llvm-svn: 93410
2010-01-14 02:24:50 +00:00
Victor Hernandez
d2b4f36986
Extend testcase to also test llvm.dbg.value intrinsic
...
llvm-svn: 93408
2010-01-14 02:12:41 +00:00
Victor Hernandez
b658d30b91
Now that LLParser, AsmWriter, BitcodeReader, and BitcodeWriter all correctly support function-local metadata, test it.
...
llvm-svn: 93406
2010-01-14 01:51:28 +00:00
Ted Kremenek
e34cbde383
Switch return site to use clang_getNullCursor().
...
llvm-svn: 93405
2010-01-14 01:51:23 +00:00
Ted Kremenek
e1b5525510
Further tweak USR generation by shorting names and distinguish between namespaces and functions.
...
llvm-svn: 93404
2010-01-14 01:50:21 +00:00
Victor Hernandez
6c730dea6f
In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.
...
llvm-svn: 93403
2010-01-14 01:50:08 +00:00
Victor Hernandez
61e6e829c6
Fix printing of function-local metadata in AsmWriter
...
llvm-svn: 93402
2010-01-14 01:47:37 +00:00
Victor Hernandez
b816154268
Clean up unnecessary return and brackets
...
llvm-svn: 93401
2010-01-14 01:46:02 +00:00
Victor Hernandez
8c85e25589
Add MDNode::getFunction(), which figures out the metadata's function, if it has function that it is local to.
...
llvm-svn: 93400
2010-01-14 01:45:14 +00:00
Anders Carlsson
2a4adbea96
Add a DenseMapInfo specialization for BaseSubobject.
...
llvm-svn: 93399
2010-01-14 01:39:42 +00:00
Douglas Gregor
69a8e083c5
When providing completions for a member access expression in C++,
...
provided nested-name-specifier results for base classes (only), rather
than everything that could possibly be a nested-name-specifier.
llvm-svn: 93398
2010-01-14 01:17:14 +00:00
Douglas Gregor
c580c5205f
Switch code-completion for ordinary names over to the new(ish)
...
LookupVisibleDecls, unifying the name lookup mechanisms used by code
completion and typo correction. Aside from the software-engineering
improvements, this makes code-completion see through using directives
and see ivars when performing unqualified name lookup in an
Objective-C instance method.
llvm-svn: 93397
2010-01-14 01:09:38 +00:00
John McCall
a1709fd822
Improve the diagnostic for bad conversions in overload resolution to talk
...
about 'object argument' vs. 'nth argument'.
llvm-svn: 93395
2010-01-14 00:56:20 +00:00
Jakob Stoklund Olesen
bff090648b
Don't fold insufficiently aligned ldr/str into ldm/stm instructions.
...
An unaligned ldr causes a trap, and is then emulated by the kernel with
awesome performance. The darwin kernel does not emulate unaligned ldm/stm
Thumb2 instructions, so don't generate them.
This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2.
Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably
also a bad idea, but that is beyond the scope of this patch.
llvm-svn: 93393
2010-01-14 00:54:10 +00:00
John McCall
9015cde4dc
Add the %ordinal format modifier for turning '1' into '1st'. Hard-coded for
...
English right now; would not be impossible to grab a special format string
from the diagnostic pool and localize that way.
llvm-svn: 93390
2010-01-14 00:50:32 +00:00
Devang Patel
4274a326be
Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used.
...
llvm-svn: 93389
2010-01-14 00:48:09 +00:00
Douglas Gregor
e0717ab39c
More refactoring of ResultBuilder::MaybeAddResult. No intended
...
functionality change.
llvm-svn: 93386
2010-01-14 00:41:07 +00:00
Devang Patel
934661ed73
Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.
...
llvm-svn: 93383
2010-01-14 00:36:21 +00:00
Fariborz Jahanian
e2dd5428e6
Fix a bug in rewrite whereby functions using blocks put extern "C" in wrong place.
...
Fixes radar 7284618.
llvm-svn: 93382
2010-01-14 00:35:56 +00:00
Stuart Hastings
e355daf7b0
Erm, previous patch was wrong; Thanks Bill\!
...
llvm-svn: 93381
2010-01-14 00:34:53 +00:00
Stuart Hastings
b65256c414
Enable assertions by default for Apple-style builds.
...
llvm-svn: 93380
2010-01-14 00:22:05 +00:00
Douglas Gregor
7c208616b4
Refactor the "is this declaration interesting" logic in
...
code-completion's ResultBuilder::MaybeAddResult for later reuse.
llvm-svn: 93379
2010-01-14 00:20:49 +00:00
Douglas Gregor
0235c4243f
Look through using declarations when determining whether one decl hides another
...
llvm-svn: 93378
2010-01-14 00:06:47 +00:00
John McCall
e4d5432136
Perform format-expansion on %select results.
...
llvm-svn: 93377
2010-01-13 23:58:20 +00:00
Douglas Gregor
f98e6a28e4
Banish the notion of a "rank" for code-completion results, since we
...
are no longer using it for anything. No intended functionality change.
llvm-svn: 93376
2010-01-13 23:51:12 +00:00
Chris Lattner
3eb76c23dd
this is an SSE-specific issue.
...
llvm-svn: 93373
2010-01-13 23:29:11 +00:00
Chris Lattner
fb534d97b5
X86 if conversion + tail merging issues from PR6032.
...
llvm-svn: 93372
2010-01-13 23:28:40 +00:00
Douglas Gregor
52ce62f069
Improve the sorting of code-completion results. We now always sort by
...
the "typed" text, first, then take into account
nested-name-specifiers, name hiding, etc. This means that the
resulting sort is actually alphabetical :)
llvm-svn: 93370
2010-01-13 23:24:38 +00:00
Bill Wendling
ad7a5b07a7
When the visitSub method was split into visitSub and visitFSub, this xform was
...
added to the FSub version. However, the original version of this xform guarded
against doing this for floating point (!Op0->getType()->isFPOrFPVector()).
This is causing LLVM to perform incorrect xforms for code like:
void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){
double mh, ml;
double c = 134217729.0;
double up, u1, u2, vp, v1, v2;
up = xh*c;
u1 = (xh - up) + up;
u2 = xh - u1;
vp = yh*c;
v1 = (yh - vp) + vp;
v2 = yh - v1;
mh = xh*yh;
ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2);
ml += xh*yl + xl*yh;
*rhi = mh + ml;
*rlo = (mh - (*rhi)) + ml;
}
The last line was optimized away, but rl is intended to be the difference
between the infinitely precise result of mh + ml and after it has been rounded
to double precision.
llvm-svn: 93369
2010-01-13 23:23:17 +00:00
John McCall
e8c8cd2a58
Don't report ambiguities in the user-defined conversion if we weren't supposed
...
to be considering user-defined conversions in the first place.
Doug, please review; I'm not sure what we should be doing if we see a real
ambiguity in selecting a copy constructor when otherwise suppressing
user-defined conversions.
Fixes PR6014.
llvm-svn: 93365
2010-01-13 22:30:33 +00:00
Tobias Grosser
e77d17b73a
Add getSource() to SuccIterator
...
Get the source BB of an iterator.
llvm-svn: 93364
2010-01-13 22:21:43 +00:00
Tobias Grosser
ad3f4bd6f9
Extend SuccIterator
...
Implement most of the missing methods to make SuccIterator random access.
operator[] is still missing.
llvm-svn: 93363
2010-01-13 22:21:28 +00:00
John McCall
02bc54d11c
Don't a.k.a. through the primary typedef of an anonymous tag decl.
...
llvm-svn: 93362
2010-01-13 22:07:44 +00:00