Daniel Dunbar
debb79b994
Sink {config.h,ConfigureChecks}.cmake into cmake directory.
...
llvm-svn: 93318
2010-01-13 16:12:49 +00:00
Benjamin Kramer
2e06b93f43
Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
...
twine can be represented as a single StringRef. Use the new methode to simplify
some twine users.
llvm-svn: 93317
2010-01-13 12:45:23 +00:00
John McCall
6a61b5203d
Record some basic information about bad conversion sequences. Use that
...
information to feed diagnostics instead of regenerating it. Much room for
improvement here, but fixes some unfortunate problems reporting on method calls.
llvm-svn: 93316
2010-01-13 09:16:55 +00:00
Alexis Hunt
c88db06565
Implement semantic checking for C++ literal operators.
...
This now rejects literal operators that don't meet the requirements.
Templates are not yet checked for.
llvm-svn: 93315
2010-01-13 09:01:02 +00:00
Alexis Hunt
10e2f7264e
Update test function names so as not to use potential keywords.
...
llvm-svn: 93314
2010-01-13 08:58:42 +00:00
Evan Cheng
b5499d09d1
Re-enable extension optimization pass.
...
llvm-svn: 93313
2010-01-13 08:45:40 +00:00
Alexis Hunt
af4e28d897
Add a bunch more feature-checking macros for C++0x features. Some of these are
...
disabled with the intent that users can start with them now and not have to change
a thing to have them work when we implement the features.
llvm-svn: 93312
2010-01-13 08:31:49 +00:00
Chris Lattner
ede8ad45bc
upgrade and MC'ize a few uses of makeNameProper.
...
llvm-svn: 93310
2010-01-13 08:08:33 +00:00
Chris Lattner
4cd281dab1
MC'ize this a bit and upgrade APIs
...
llvm-svn: 93309
2010-01-13 08:04:24 +00:00
Chris Lattner
b0dc959e1d
add a fixme, ELF MCSection isn't quite right and weak unnamed globals are broken
...
on linux (even though they are pointless, they shouldn't ICE).
llvm-svn: 93308
2010-01-13 08:02:14 +00:00
Evan Cheng
ceb5a4e8f6
For now, avoid issuing extract_subreg to reuse lower 8-bit, it's not safe in 32-bit.
...
llvm-svn: 93307
2010-01-13 08:01:32 +00:00
Evan Cheng
957b8beaaa
Add comment; refactor; avoid pulling in DT if it's not used.
...
llvm-svn: 93306
2010-01-13 07:59:13 +00:00
Chris Lattner
f0a401fcf0
eliminate some uses of Mangler::makeNameProper.
...
llvm-svn: 93305
2010-01-13 07:56:59 +00:00
Chris Lattner
98b05e017b
don't add the \1 to the name.
...
llvm-svn: 93304
2010-01-13 07:50:21 +00:00
Chris Lattner
25d8ed3773
remove uses of deprecated functions, this generates slightly
...
different BlockAddress labels, but nothing semantically important.
Add a FIXME that BlockAddress codegen is broken if the LLVM BB has
an empty name (e.g. strip was run).
llvm-svn: 93303
2010-01-13 07:30:49 +00:00
Chris Lattner
2b630fe822
use the new form of getNameWithPrefix, not makeNameProper.
...
Among other things, this would do very weird things if the
basic block name had (e.g.) a space in it on darwin:
makeNameProper would add quotes, then the mcsymbol would
escape the quotes.
llvm-svn: 93302
2010-01-13 07:16:53 +00:00
Chris Lattner
1126534dce
add new isSingleStringRef()/getSingleStringRef() methods to twine,
...
and use them to avoid a copy of a string in getNameWithPrefix in
the common case. It seems like Value::setName and other places
should use this as well?
llvm-svn: 93301
2010-01-13 07:12:06 +00:00
Chris Lattner
33535b3250
ugh, my last patch just sped up a method and changed all the clients
...
that I want to completely eliminate. Add fixme's so I remember this
in the future, and add the missing helper that they should be upgraded
to use instead.
llvm-svn: 93300
2010-01-13 07:01:09 +00:00
John McCall
6d11e07b16
Insert clang-flags into the clang command. Currently it needs to be a list;
...
future work should permit strings (by splitting them into a list o' strings).
llvm-svn: 93299
2010-01-13 06:44:51 +00:00
Chris Lattner
209aecad0c
change Mangler::makeNameProper to return its result in a SmallVector
...
instead of returning it in an std::string. Based on this change:
1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
prefixes, not use temporary std::strings, and to avoid other crimes.
llvm-svn: 93298
2010-01-13 06:38:18 +00:00
Nick Kledzik
64eecd2de5
Fix copy/paste error. http://llvm.org/bugs/show_bug.cgi?id=572
...
llvm-svn: 93297
2010-01-13 05:30:28 +00:00
Chris Lattner
b252cbb04c
my mistake, Mangler::makeNameProper wants to take a twine, not a stringref!
...
llvm-svn: 93296
2010-01-13 05:02:57 +00:00
Chris Lattner
04a7ce850d
change makeNameProper to take a stringref instead of std::string.
...
llvm-svn: 93295
2010-01-13 04:55:33 +00:00
Chris Lattner
e192d377c5
give StringRef a const_iterator member.
...
llvm-svn: 93294
2010-01-13 04:50:20 +00:00
Chris Lattner
8e26d19cb3
fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
...
llvm-svn: 93293
2010-01-13 04:39:46 +00:00
Chris Lattner
4581a4f03a
reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.
...
llvm-svn: 93292
2010-01-13 04:38:16 +00:00
Chris Lattner
a32ba6d056
reduce indentation and add a fast-path to EmitGlobalConstant for 8-byte
...
integers on 64-bit systems.
llvm-svn: 93291
2010-01-13 04:34:19 +00:00
Chris Lattner
7e0c164b5e
reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly
...
llvm-svn: 93290
2010-01-13 04:29:19 +00:00
Victor Hernandez
013a91ddfe
Revert 93270 pending investigation of how stray non-constant values end up in ValueEnumerator's ValueList during WriteConstants()
...
llvm-svn: 93289
2010-01-13 03:18:30 +00:00
Chris Lattner
3d756f1a9e
diagnose invalid values of -ftabstop, patch by Christian Adaker!
...
llvm-svn: 93288
2010-01-13 03:06:50 +00:00
Mike Stump
1bacb81d6f
Add an unreachable code checker.
...
llvm-svn: 93287
2010-01-13 02:59:54 +00:00
Evan Cheng
d7d8f6d000
Disable opt-ext pass to unbreak the build for now.
...
llvm-svn: 93286
2010-01-13 01:51:43 +00:00
Evan Cheng
7a4bac3000
Remove debug option I accidentally left in.
...
llvm-svn: 93285
2010-01-13 01:43:20 +00:00
Dale Johannesen
93e42c5435
Fix a comment.
...
llvm-svn: 93284
2010-01-13 01:39:38 +00:00
Ted Kremenek
451a965a78
Update CMake file.
...
llvm-svn: 93283
2010-01-13 01:02:47 +00:00
Daniel Dunbar
4f2bc55d4e
cc1: Factor out CompilerInstance::ExecuteAction which has the majority of the
...
clang -cc1 logic for running an action against a set of options.
- This should make it easier to build tools that have a clang -cc1 like
interface, but aren't actually part of clang -cc1.
llvm-svn: 93282
2010-01-13 00:48:06 +00:00
Daniel Dunbar
7d38d4da61
cc1: Lift creation of the FrontendAction higher.
...
llvm-svn: 93281
2010-01-13 00:47:51 +00:00
Jakob Stoklund Olesen
a94837dc24
Remove the JustSP single-register regclass.
...
It was only being used by instructions with the t_addrmode_sp addressing mode,
and that is pattern matched in a way that guarantees SP is used. There is
never any register allocation done from this class.
llvm-svn: 93280
2010-01-13 00:43:06 +00:00
Jeffrey Yasskin
0ad23efb0f
Try to fix the ARM and PPC buildbots. The -mattr=vector-unaligned-mem
...
flag doesn't exist there, and this is an x86 test.
llvm-svn: 93279
2010-01-13 00:31:43 +00:00
Evan Cheng
30bebff456
Add a quick pass to optimize sign / zero extension instructions. For targets where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg.
...
For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used.
llvm-svn: 93278
2010-01-13 00:30:23 +00:00
John McCall
e1ac8d1742
Improve the reporting of non-viable overload candidates by noting the reason
...
why the candidate is non-viable. There's a lot we can do to improve this, but
it's a good start. Further improvements should probably be integrated with the
bad-initialization reporting routines.
llvm-svn: 93277
2010-01-13 00:25:19 +00:00
Ted Kremenek
78668fdcfb
Move definitions for visitor methods in CDeclVisitor out-of-line.
...
llvm-svn: 93276
2010-01-13 00:22:49 +00:00
Ted Kremenek
1351b09b04
Make method definitions in TUVisitor out-of-line, making it easy to tell what visitor methods are defined.
...
Generalize TUVisitor to take a general "root" and "iterator" callback; this is prep. work to merging TUVisitor and CDeclVisitor.
llvm-svn: 93275
2010-01-13 00:13:47 +00:00
Douglas Gregor
08dc584c3f
Remove broken fix-it when a default function argument has been
...
redefined. There's a FIXME with an apology about why we don't try to
do better here. Fixes <rdar://problem/7513023>.
llvm-svn: 93274
2010-01-13 00:12:48 +00:00
Dale Johannesen
7b1a7ed330
Further progration of metadata operands. The
...
dumper doesn't really do what I want yet, but
at least it doesn't crash now.
llvm-svn: 93272
2010-01-13 00:00:24 +00:00
Fariborz Jahanian
6fada5be91
When in objective-c methods, do the built-in name lookup after
...
ivar name lookup. Fixes pr5986.
llvm-svn: 93271
2010-01-12 23:58:59 +00:00
Victor Hernandez
fc4aefb129
Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
...
llvm-svn: 93270
2010-01-12 23:37:59 +00:00
Ted Kremenek
58a6a8ec62
Add USR printing modes to c-index-test.
...
llvm-svn: 93269
2010-01-12 23:34:26 +00:00
Ted Kremenek
a188cbbf29
Make clang_getDeclUSR() visible.
...
llvm-svn: 93268
2010-01-12 23:34:05 +00:00
Ted Kremenek
cb674f9492
Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl instead of a CXEntity.
...
Enhance USR generation a bit with support for records.
llvm-svn: 93267
2010-01-12 23:33:42 +00:00