summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid ↵Justin Holewinski2011-04-201-0/+86
| | | | | | architectures for triples, e.g. ptx32-unknown-unknown llvm-svn: 129870
* Fix a crash-on-invalid involving non-identifier names in a memberDouglas Gregor2011-04-201-0/+7
| | | | | | | access expression that appears to be a property reference. Fixes <rdar://problem/8985943>. llvm-svn: 129865
* Give invalid tag types 8-bit size and alignment, rather than 1-bitDouglas Gregor2011-04-201-2/+2
| | | | | | | | alignment, which causes traps further down the line. Fixes <rdar://problem/9109755>, which contains a test case far too large to commit :( llvm-svn: 129861
* Eliminate an uninteresting assertion; invalid code involvingDouglas Gregor2011-04-201-2/+0
| | | | | | | | out-of-line destructors can result in the addition of redundant destructors to a class. It's not harmful to the AST. Fixes <rdar://problem/9158632>. llvm-svn: 129860
* Use S.str() to force a flush.Fariborz Jahanian2011-04-201-3/+1
| | | | llvm-svn: 129856
* Driver: Suppress some additional warnings with -Qunused-arguments.Daniel Dunbar2011-04-201-0/+4
| | | | llvm-svn: 129853
* Be sure to flush raw_string_ostream objects in the Objective-CDouglas Gregor2011-04-201-0/+2
| | | | | | rewriter, from Eric Niebler! llvm-svn: 129849
* Teach SourceManager::getSLocEntry() that it can fail due to problemsDouglas Gregor2011-04-202-24/+93
| | | | | | | | during deserialization from a precompiled header, and update all of its callers to note when this problem occurs and recover (more) gracefully. Fixes <rdar://problem/9119249>. llvm-svn: 129839
* TWEAKDaniel Dunbar2011-04-191-1/+1
| | | | llvm-svn: 129835
* Driver/Darwin: Switch to using -macosx for OS name in triples.Daniel Dunbar2011-04-192-6/+2
| | | | llvm-svn: 129834
* IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, weDaniel Dunbar2011-04-191-5/+6
| | | | | | | | were computing the conversion as (ptr != 0 && non-virtual), when it should be (ptr != 0 || is-virtual). - Test to follow in LLVM test-suite. llvm-svn: 129830
* some cleanups to use IRBuilder methods instead of llvm:: foo methods.Chris Lattner2011-04-191-42/+34
| | | | llvm-svn: 129829
* Driver/Darwin: Switch to using new style triples.Daniel Dunbar2011-04-191-16/+4
| | | | llvm-svn: 129824
* ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar2011-04-198-49/+52
| | | | llvm-svn: 129823
* Avoid superfluous warning after an error is detcted and reported.Fariborz Jahanian2011-04-191-1/+4
| | | | | | // rdar://9132143 llvm-svn: 129822
* Basic/Darwin: Add support for new -osx and -ios style triples (not yet used).Daniel Dunbar2011-04-191-17/+33
| | | | llvm-svn: 129820
* use the newly introduced IRBuilder getInt() method to reduce someChris Lattner2011-04-191-17/+12
| | | | | | redundancy pointed out by John. llvm-svn: 129808
* We regard a function as 'unused' from the codegen perspective, so our ↵Argyrios Kyrtzidis2011-04-196-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings diverge from gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. llvm-svn: 129794
* Add a new expression classification, CL_AddressableVoidPeter Collingbourne2011-04-191-4/+9
| | | | | | | | | CL_AddressableVoid is the expression classification used for void expressions whose address can be taken, i.e. the result of [], * or void variable references in C, as opposed to things like the result of a void function call. llvm-svn: 129783
* Make the VariadicMethodTypeChecker accept block pointers as Objective-C ↵Anders Carlsson2011-04-191-0/+4
| | | | | | pointers. Fixes PR9746. llvm-svn: 129741
* Driver/Darwin: Change to use generic iOS runtime library, which we now ↵Daniel Dunbar2011-04-181-4/+2
| | | | | | always need. llvm-svn: 129734
* Add SelectorTable::getTotalMemory() to allow clients to query how much ↵Ted Kremenek2011-04-181-0/+4
| | | | | | memory is used by selectors. llvm-svn: 129728
* Driver/Darwin: Disable movw/movt with -mkernel or -fapple-kext.Daniel Dunbar2011-04-181-0/+6
| | | | llvm-svn: 129721
* Fix a bug in calculation of composite typeFariborz Jahanian2011-04-181-3/+3
| | | | | | | | of conditional expressions of objc pointer types where one type is the immediate base type of the other. // rdar://9296866 llvm-svn: 129718
* Driver: Support -fno-lto.Daniel Dunbar2011-04-181-1/+2
| | | | llvm-svn: 129712
* Add ToolChain path support for linker on Slackware.Ted Kremenek2011-04-181-0/+3
| | | | llvm-svn: 129704
* Fix typo in comment.Devang Patel2011-04-182-2/+2
| | | | llvm-svn: 129703
* Fix PR9741. The implicit declarations created for range-based for loops ↵Richard Smith2011-04-182-2/+4
| | | | | | weren't being added to the DeclContext (nor were they being marked as implicit). Also, the declarations were being emitted in the wrong order when building the CFG. llvm-svn: 129700
* When providing code completions of ivar names for a propertyDouglas Gregor2011-04-181-18/+30
| | | | | | | | | | | | | | | | implementation such as @synthesize Prop1 = Give priority to ivars whose type matches or closely matches the property type (as we do for several other kinds of results). Additionally, if there is an ivar with the same name as the property, or differs only due to a _ prefix or suffix, give that ivar a priority bump. Finally, verify that this search is properly returning ivars within class extensions and implementations (<rdar://problem/8488854>). llvm-svn: 129699
* Get rid of std::vector usage when getting function types in CGException.cppAnders Carlsson2011-04-181-30/+22
| | | | llvm-svn: 129698
* When producing code completion results for the Objective-C propertyDouglas Gregor2011-04-181-5/+42
| | | | | | | | | | | implementation @synthesize <property> = also produce a completion for a to-be-synthesized ivar named _<property>. llvm-svn: 129697
* Clean up code generation of typeid expressions and add C++ standard references.Anders Carlsson2011-04-181-37/+53
| | | | llvm-svn: 129682
* Fix a miscompilation I introduced in r129652, thanks for Eli for tracking Chris Lattner2011-04-171-1/+9
| | | | | | | | | | | | | | | it down. we effectively were compile the testcase into: void test14(int x) { switch (x) { case 11: break; case 42: test14(97); // fallthrough default: test14(42); break; which is not the same thing at all. This fixes a miscompilation of MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot. llvm-svn: 129679
* When laying out bases in, always try the "base subobject" LLVM type. If itAnders Carlsson2011-04-171-14/+66
| | | | | | | | | | | | | turns out that a field or base needs to be laid out in the tail padding of the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert it to an array of i8. I've audited the new test results to make sure that they are still valid. I've also verified that we pass a self-host with this change. This (finally) fixes PR5589! llvm-svn: 129673
* Add addBaseSubobjectTypeName which isn't used yet.Anders Carlsson2011-04-172-0/+14
| | | | llvm-svn: 129671
* Move code to add a type name to a TagDecl type out into a helper function. ↵Anders Carlsson2011-04-172-25/+37
| | | | | | No functionality change. llvm-svn: 129669
* Use a SmallVector for field types in CGRecordLayoutBuilder now that ↵Anders Carlsson2011-04-171-1/+1
| | | | | | llvm::StructType::get takes an ArrayRef. llvm-svn: 129667
* Make -mno-mmx imply -mno-3dnow. This is what gcc does, and it makes sense.Michael J. Spencer2011-04-171-4/+3
| | | | | | | | Also, fold the sse4 and sse4.1 cases together. Patch by Alexander Best! llvm-svn: 129665
* Hack to turn the valgrind buildbot green, until Devang can address itEli Friedman2011-04-171-1/+1
| | | | | | properly. llvm-svn: 129657
* implement rdar://9289524 - case followed immediately by break results in ↵Chris Lattner2011-04-173-0/+42
| | | | | | | | empty IR block, a -O0 code quality issue. llvm-svn: 129652
* fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizesChris Lattner2011-04-171-1/+50
| | | | | | | | | are trivial. This exposes opportunities earlier, and allows fastisel to do good things with these at -O0. This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0 llvm-svn: 129651
* fix rdar://9289603 - clang should fold trivial ?: for enums as well as ↵Chris Lattner2011-04-161-3/+2
| | | | | | | | integer constants into select at -O0 by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums. llvm-svn: 129649
* Testing my commit access. A few whitespace changes to Sema/SemaCXXCast.cpp.Richard Trieu2011-04-161-7/+5
| | | | llvm-svn: 129629
* Introduce Rewriter::IncreaseIndentation() which increase indentations for ↵Argyrios Kyrtzidis2011-04-161-0/+83
| | | | | | | | | the lines between the given source range. To determine what the indentation should be, a SourceLocation 'parentIndent' parameter is used that should be at a source location with an indentation one degree lower than the given range. llvm-svn: 129628
* Emit proper selector name in debug info.Devang Patel2011-04-162-2/+17
| | | | llvm-svn: 129626
* Emit debug info for Objective-C properties.Devang Patel2011-04-161-3/+16
| | | | llvm-svn: 129625
* Fix bug in vector initializer when initializing a vector with another vector.Tanya Lattner2011-04-151-0/+6
| | | | | | Add test case. llvm-svn: 129617
* Enforce nonnull __attribute__ on Objective-C method calls.Fariborz Jahanian2011-04-151-0/+6
| | | | | | // rdar://9287695 llvm-svn: 129615
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-155-13/+104
| | | | | | Monrocq llvm-svn: 129614
* For the purposes of overload resolution, consider a conversion from anDouglas Gregor2011-04-151-1/+1
| | | | | | | | | Objective-C pointer to void* as a "conversion to void*". This allows us to prefer an Objective-C object pointer conversion to a superclass object pointer over an Objective-C object pointer conversion to cv-void*. Fixes PR9735. llvm-svn: 129603
OpenPOWER on IntegriCloud