Commit Graph

76017 Commits

Author SHA1 Message Date
Anders Carlsson 20871481d2 Add a BaseSubobject class to uniquely identify a base class subobject. Not yet used.
llvm-svn: 93345
2010-01-13 20:11:15 +00:00
John McCall e8595036c4 Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.

llvm-svn: 93344
2010-01-13 20:03:27 +00:00
Ted Kremenek e14e372b67 Add 'referringDecl' field to CXCursor to prepare the way to better model declaration references from other delcarations.
llvm-svn: 93343
2010-01-13 19:59:20 +00:00
Jakob Stoklund Olesen fcf91ee403 Fix pasto
llvm-svn: 93342
2010-01-13 19:54:39 +00:00
Chris Lattner c5b7dcf552 stop the CBE from using deprecated Mangler stuff.
llvm-svn: 93341
2010-01-13 19:54:07 +00:00
Mike Stump 92d487712e Fix for Release-Asserts.
llvm-svn: 93340
2010-01-13 19:40:37 +00:00
Victor Hernandez b00a6beef6 Write function-local metadata as a metadata subblock of a funciton block
llvm-svn: 93339
2010-01-13 19:37:33 +00:00
Victor Hernandez cad7328d8c Enumerate function-local metadata (and its types and operands) only during function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator
llvm-svn: 93338
2010-01-13 19:36:16 +00:00
Victor Hernandez 108d3acb43 Parse function-local metadata inside function blocks
llvm-svn: 93337
2010-01-13 19:34:08 +00:00
Chris Lattner 643b817d92 Use the GV version of getNameWithPrefix in TargetLoweringObjectFileCOFF::
SelectSectionForGlobal, unbreaking weak globals with no-name.

llvm-svn: 93336
2010-01-13 19:19:17 +00:00
Evan Cheng af0ad65ff2 Commit some changes I had managed to lose last night while refactoring the code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them.
This fixes PR6027.

llvm-svn: 93335
2010-01-13 19:16:39 +00:00
Chris Lattner a9365352cf just finish MCizing FnStubInfo which cleans it up and simplifies it.
llvm-svn: 93334
2010-01-13 19:13:16 +00:00
Chris Lattner 45faea454d don't call getNameWithPrefix repeatedly and unnecesarily.
llvm-svn: 93333
2010-01-13 19:05:36 +00:00
Chris Lattner 9148f36e90 properly use MCSymbol to print the strings aquired from getNameWithPrefix.
llvm-svn: 93332
2010-01-13 19:00:57 +00:00
Fariborz Jahanian 3f7b8b274d Predefine __weak attribute when doing objective-c
rewriting for any target. (refixes radar 7530235).

llvm-svn: 93331
2010-01-13 18:51:17 +00:00
Ted Kremenek 95ae5e16b9 Add extra null check in clang_disposeString().
llvm-svn: 93328
2010-01-13 18:45:36 +00:00
Douglas Gregor 9de54ea41b Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

  C(int); // constructor

and

  C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

  C::C C::f(int); // error: C::C refers to the constructor name, but
                  // we complain nicely and recover by treating it as
                  // a type.

llvm-svn: 93322
2010-01-13 17:31:36 +00:00
Douglas Gregor b89b99f1f2 Fix pasto in __has_feature(cxx_lambdas) docs
llvm-svn: 93320
2010-01-13 16:27:49 +00:00
Daniel Dunbar dcf5a317f1 Tidy up comments, remove whitespace, and rename 'print-%' make debugging target
to 'make-print-%' to match LLVM.

llvm-svn: 93319
2010-01-13 16:13:01 +00:00
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