summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a hasExternalStorageAsWritten helper. No functionality change.Rafael Espindola2013-03-072-5/+10
| | | | | | | | It is possible that some of the current uses of "getStorageClassAsWritten() == SC_Extern" should use this but I don't know enough about SC_PrivateExtern to change and test them. llvm-svn: 176606
* Debug Info: store the files and directories for each compile unit.Manman Ren2013-03-0712-46/+87
| | | | | | | | | | | | | | We now emit a line table for each compile unit. To reduce the prologue size of each line table, the files and directories used by each compile unit are stored in std::map<unsigned, std::vector< > > instead of std::vector< >. The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each compile unit causes a huge increase of debug info. With this patch, each prologue will only emit the files required by the compile unit. rdar://problem/13342023 llvm-svn: 176605
* ArrayRef has a OneElt constructor. Beautify the code.Nadav Rotem2013-03-071-2/+1
| | | | llvm-svn: 176604
* Fix typo.Rafael Espindola2013-03-071-1/+1
| | | | llvm-svn: 176603
* Switch from std::vector to ArrayRef. Speedup FoldBitCast by 5x.Nadav Rotem2013-03-071-3/+3
| | | | llvm-svn: 176602
* [analyzer] Check for returning null references in ReturnUndefChecker.Jordan Rose2013-03-074-35/+210
| | | | | | | | | | | | | | | | | Officially in the C++ standard, a null reference cannot exist. However, it's still very easy to create one: int &getNullRef() { int *p = 0; return *p; } We already check that binds to reference regions don't create null references. This patch checks that we don't create null references by returning, either. <rdar://problem/13364378> llvm-svn: 176601
* [analyzer] Clean up a few doc comments for ProgramState and CallEvent.Jordan Rose2013-03-073-6/+14
| | | | | | No functionality change. llvm-svn: 176600
* SimplifyCFG fix for volatile load/store.Andrew Trick2013-03-072-2/+52
| | | | | | | | | | | | | Fixes rdar:13349374. Volatile loads and stores need to be preserved even if the language standard says they are undefined. "volatile" in this context means "get out of the way compiler, let my platform handle it". Additionally, this is the only way I know of with llvm to write to the first page (when hardware allows) without dropping to assembly. llvm-svn: 176599
* Fix two remaining issue after fixing PR15355 when CMOV is not availableMichael Liao2013-03-073-6/+89
| | | | | | | | | | | - Phi nodes should be replaced/updated after lowering CMOV into branch because 'mainMBB' updating operand in Phi node is changed. - Add EFLAGS in livein before lowering the 2nd CMOV. It's necessary as we will reuse the EFLAGS generated before the 1st lowered CMOV, which won't clobber EFLAGS. However, we need explicitly specify that. - '-attr=-cmov' test case are added. llvm-svn: 176598
* Clean up LLDB CMake build outputDaniel Malea2013-03-071-3/+3
| | | | | | | - remove "-debug" flag from swig scripts - use "echo -n" instead of "echo" in dummy target to avoid printing a useless newline llvm-svn: 176597
* Fix running of LLDB tests with cmake+ninja+ccacheDaniel Malea2013-03-071-1/+3
| | | | | | - Avoid passing 'ccache' as the test compiler. Instead, use first arg after ccache. llvm-svn: 176596
* Fix Linux i386 buildDaniel Malea2013-03-072-0/+13
| | | | | | | - missing definitions were causing different definitions of type 'off_t', resulting in linker errors - fix is to define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64 llvm-svn: 176595
* <rdar://problem/13119170>Han Ming Ong2013-03-061-0/+30
| | | | | | Reap the child process (debugserver) when it is done. llvm-svn: 176594
* No functionality change at this time. I've split _LIBCPP_VISIBLE up into ↵Howard Hinnant2013-03-0663-777/+784
| | | | | | two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute. llvm-svn: 176593
* <rdar://problem/13362109>Greg Clayton2013-03-062-35/+46
| | | | | | LLDB was not parsing line tables correctly for DWARF in .o files after recent debug map changes. This has now been fixed. llvm-svn: 176592
* Remove some tabs and extraneous space chars from ObjectFileMachO.cpp.Jason Molenda2013-03-061-136/+136
| | | | | | Noticed these while working on the last commit. llvm-svn: 176590
* Retrieve the dyld shared cache mapping offset from the shared cache instead ↵Jason Molenda2013-03-061-14/+64
| | | | | | | | | of hardcoding the value. Read the version number of the dyld shared cache. <rdar://problem/13311882> llvm-svn: 176589
* Ensure that DIType is regenerated after we visit an implementationAdrian Prantl2013-03-067-27/+203
| | | | | | | | | | that adds ivars to an interface. Fixes rdar://13175234 This is an update to r176116 that performs a smart caching of interfaces. llvm-svn: 176584
* [ELF] Order weak symbols properlyShankar Easwaran2013-03-0615-34/+268
| | | | llvm-svn: 176583
* Skipping TestConstVariables on Linux.Andrew Kaylor2013-03-061-1/+1
| | | | | | The test was marked as expectedFailureLinux, but now it passes with gcc and some versions of clang. Newer versions of clang introduce a failure due to bad DWARF information. llvm-svn: 176581
* [mips] Custom-legalize BR_JT.Akira Hatanaka2013-03-063-16/+53
| | | | | | In N64-static, GOT address is needed to compute the branch address. llvm-svn: 176580
* Added tests to test for "settings set" with trailing whitespaces after the ↵Greg Clayton2013-03-061-4/+54
| | | | | | values. llvm-svn: 176579
* Adding support for DW_OP_stack_value in DWARFExpression::EvaluateAndrew Kaylor2013-03-061-0/+12
| | | | llvm-svn: 176578
* [analyzer] Pass the correct Expr to the bug reporter visitors when dealing ↵Anna Zaks2013-03-062-3/+56
| | | | | | | | with CompoundLiteralExpr This allows us to trigger the IDC visitor in the added test case. llvm-svn: 176577
* [analyzer] IDC: Add config option; perform the idc check on first “null ↵Anna Zaks2013-03-064-3/+24
| | | | | | | | | | node” rather than last “non-null”. The second modification does not lead to any visible result, but, theoretically, is what we should have been looking at to begin with since we are checking if the node was assumed to be null in an inlined function. llvm-svn: 176576
* Added a little bit of logging to ClangFunction toSean Callanan2013-03-061-1/+29
| | | | | | make it more obvious what's going on. llvm-svn: 176575
* Add support for non-register scalar values in DoMaterializeOneVariable.Andrew Kaylor2013-03-061-120/+173
| | | | llvm-svn: 176574
* Have basic_istream::read call sgetn intead of sbumpc individual characters. ↵Howard Hinnant2013-03-061-10/+3
| | | | | | This addresses http://llvm.org/bugs/show_bug.cgi?id=15427. llvm-svn: 176573
* Generalize my previous fix for -print-options.Andrew Trick2013-03-062-2/+2
| | | | | | | Always print options that differ from their implicit default. At least for simple option types. llvm-svn: 176572
* Remove tailing whitespacesMichael Liao2013-03-061-14/+14
| | | | llvm-svn: 176570
* Give -loop-vectorize an explicit default.Andrew Trick2013-03-061-1/+1
| | | | | | This way, clang -mllvm -print-options shows that the driver is overriding it. llvm-svn: 176569
* Correct silly type-o. Thanks Richard.Howard Hinnant2013-03-061-1/+1
| | | | llvm-svn: 176568
* [PCH] When pre-validating the headers from the PCH, only validate non-system ↵Argyrios Kyrtzidis2013-03-062-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | headers. Stat'ing all the headers from the PCH to make sure they are up-to-date takes significant time. In a particular source file (whose PCH file included Cocoa.h) from total -fsyntax-only time 12% was just stat calls. Change pre-validation to only check non-system headers. There are some notable disadvantages: -If a system header, that is not include-guarded, changes after the PCH was created, we will not find it in the header info table and we will #import it, effectively #importing it twice, thus we will emit some error due to a multiple definition and after that the "header was modified" error will likely be emitted, for example something like: NSDictionary.h:12:1: error: duplicate interface definition for class 'NSDictionary' @interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration> ^ NSDictionary.h:12:12: note: previous definition is here @interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration> ^ fatal error: file 'NSDictionary.h' has been modified since the precompiled header was built Though we get the "header was modified" error, this is a bit confusing. -Theoretically it is possible that such a system header will cause no errors but it will just cause an unfortunate semantic change, though I find this rather unlikely. The advantages: -Reduces compilation time when using a huge PCH like the Cocoa ones -System headers change very infrequent and when they do, users/build systems should be able to know that re-building from scratch is needed. Addresses rdar://13056262 llvm-svn: 176567
* [PCH] For HeaderFileInfoTrait, hash the key using size & time of the file.Argyrios Kyrtzidis2013-03-063-40/+66
| | | | | | | | | | | | Previously the hash would be the filename portion of the path, which could be different for a filename with different case or a symbolic link with a different name completely. This did not actually create any issue so far because by validating all headers in the PCH we created uniqued FileEntries based on inodes, so an #include of a symbolic link (refering to a file from the PCH) would end up with a FileEntry with filename same as the one recorded in the PCH. llvm-svn: 176566
* [PCH] We don't need to instantiate HeaderFileInfoTrait in ASTReader more ↵Argyrios Kyrtzidis2013-03-063-16/+5
| | | | | | | | than once. We can just re-use the one from HeaderFileInfoLookupTable. llvm-svn: 176565
* [PCH] Remove a couple of fields from ↵Argyrios Kyrtzidis2013-03-062-8/+3
| | | | | | serialization::reader::HeaderFileInfoTrait that are not used for anything. llvm-svn: 176564
* Spell Objective-C correctly.Fariborz Jahanian2013-03-062-2/+2
| | | | llvm-svn: 176563
* Memory Dependence Analysis (not mem-dep test) take advantage of ↵Shuxin Yang2013-03-065-7/+55
| | | | | | | | | | | | | | | | "invariant.load" metadata. The "invariant.load" metadata indicates the memory unit being accessed is immutable. A load annotated with this metadata can be moved across any store. As I am not sure if it is legal to move such loads across barrier/fence, this change dose not allow such transformation. rdar://11311484 Thank Arnold for code review. llvm-svn: 176562
* say objective-C in the warning and streamlineFariborz Jahanian2013-03-063-23/+13
| | | | | | several diagnostics into one. // rdar://13094352 llvm-svn: 176560
* The bitset(unsigned long long) constructor was broken by the constexpr ↵Howard Hinnant2013-03-061-0/+7
| | | | | | additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444. llvm-svn: 176559
* Improve/Cleanup ptrace wrapper and remove dependency on user.hMatt Kopec2013-03-066-72/+103
| | | | | | Patch by Ashok Thirumurthi. llvm-svn: 176558
* Driver: add support for new style multiarch in Ubuntu 13.04Dmitri Gribenko2013-03-0610-2/+57
| | | | | | Patch by Sanne Wouda. llvm-svn: 176557
* New ASTMatchers and enhancement to hasOverloadedOperatorNameEdwin Vane2013-03-064-16/+176
| | | | | | | | | | | | | | | Added two new narrowing matchers: * hasMethod: aplies a matcher to a CXXRecordDecl's methods until a match is made or there are no more methods. * hasCanonicalType: applies a matcher to a QualType's canonicalType. Enhanced hasOverloadedOperatorName to work on CXXMethodDecl as well as CXXOperatorCallExpr. Updated tests and docs. Reviewers: klimek, gribozavr llvm-svn: 176556
* [msan] Block reports from interceptors during _Unwind_BacktraceReid Kleckner2013-03-063-6/+9
| | | | | | | | | | | | | | | | | | | Summary: I'm hitting a big recursive report from: uninit on strlen -> __msan::PrintWarningWithOrigin() -> __msan::GetStackTrace() -> __sanitizer::StackTrace::SlowUnwindStack() -> _Unwind_Backtrace() -> ... libgcc calls -> uninit on strlen() -> ... repeats Reviewers: eugenis Differential Revision: http://llvm-reviews.chandlerc.com/D497 llvm-svn: 176555
* [msan] pthread_join() returns int, not void*Reid Kleckner2013-03-061-1/+1
| | | | | | | pthread_join() returns an error code, not the result of the pthread_create() function like I thought. llvm-svn: 176554
* Test case for PR-15414 - nullptr_t functionsStefanus Du Toit2013-03-061-0/+17
| | | | | | | | | | | | | The use-null-ptr transform will transform calls to functions that return a nullptr_t. Even if the function were to only return a null pointer and do nothing else, this replacement would still be undesired as the behavior and signature of the function could change in the future. This adds an XFAILed test case to demonstrate the issue. Reviewed by: Edwin Vane, Tareq Siraj llvm-svn: 176553
* [sanitizers] Fix check failure on dealloc from new threadReid Kleckner2013-03-062-2/+49
| | | | | | | | | | | | | | Summary: Adds a test for this case, which was reduced from a chromium build of WebKit's DumpRenderTree. Reviewers: eugenis CC: glider Differential Revision: http://llvm-reviews.chandlerc.com/D495 llvm-svn: 176552
* Fixed Use-Nullptr when replacing return(0)Edwin Vane2013-03-062-2/+35
| | | | | | | | | | | | Before fix, the paren expression was being replaced resulting in returnnullptr. ParenExpr and implicit casts now ignored so we get return(nullptr) instead. Added new test cases. Fixes PR15398 Author: Ariel Bernal <ariel.j.bernal@intel.com> llvm-svn: 176551
* [Sanitize] Don't emit function attribute sanitize_address/thread/memory if ↵Alexey Samsonov2013-03-062-21/+43
| | | | | | the function is blacklisted. llvm-svn: 176550
* Fixed enum printing for negative enums. There previously was no testing to ↵Greg Clayton2013-03-068-22/+281
| | | | | | | | validate that enum values were being displayed correctly. Also added C++11 enum test cases to cover enums as int8_t, int16_t int32_t, int64_t, uint8_t, uint16_t, uint32_t, and uint64_t both for DWARF and dSYM cases. The DWARF being emitted by clang is missing the enum integer type, but the code is now ready to accept and deal with the integral type if it is supplied. llvm-svn: 176548
OpenPOWER on IntegriCloud