summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Try harder to get a consistent floating point results.Rafael Espindola2013-12-051-1/+1
| | | | | | | | | This just extends the existing hack. It should be enough to get a reproducible bootstrap on 32 bits. I will open a bug to track getting a real fix for this. llvm-svn: 196462
* Add an assert to make it clear we're on the first lineAlp Toker2013-12-051-1/+3
| | | | | | A raw lexer in its initial state is guaranteed to be on line number one. llvm-svn: 196461
* Revert r196439, "If the LLVM OBJ_DIR path contains any characters not listed ↵NAKAMURA Takumi2013-12-051-4/+2
| | | | | | | | in the" Did you expect to break DOS driveletter? llvm-svn: 196460
* Remove unused variable.Richard Trieu2013-12-051-1/+0
| | | | llvm-svn: 196459
* [PECOFF] Emit the import table to .idata section.Rui Ueyama2013-12-052-23/+33
| | | | | | | | Emitting idata atoms to their own section would make debugging easier. The Windows loader do not really care about whether the DLL import table is in .rdata or its own .idata section, so there is no change in functionality. llvm-svn: 196458
* Move llvm/test/MC/ELF/thumb-st_other.s to test/MC/ARM.NAKAMURA Takumi2013-12-051-0/+0
| | | | llvm-svn: 196457
* For AArch64, add missing register cost calculation for big value types like ↵Jiangning Liu2013-12-053-1/+192
| | | | | | v4i64 and v8i64. llvm-svn: 196456
* Fix non-MSVC build error in ASTContext::getAdjustedTypeReid Kleckner2013-12-051-2/+4
| | | | | | | | Use FunctionTypeUnwrapper like we do in AttributedType to try to keep some sugar. We can actually do one better here in the future by avoiding the AdjustedType node altogether when no sugar would be lost. llvm-svn: 196455
* Fix init-captures for generic lambdas.Faisal Vali2013-12-0512-95/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For an init capture, process the initialization expression right away. For lambda init-captures such as the following: const int x = 10; auto L = [i = x+1](int a) { return [j = x+2, &k = x](char b) { }; }; keep in mind that each lambda init-capture has to have: - its initialization expression executed in the context of the enclosing/parent decl-context. - but the variable itself has to be 'injected' into the decl-context of its lambda's call-operator (which has not yet been created). Each init-expression is a full-expression that has to get Sema-analyzed (for capturing etc.) before its lambda's call-operator's decl-context, scope & scopeinfo are pushed on their respective stacks. Thus if any variable is odr-used in the init-capture it will correctly get captured in the enclosing lambda, if one exists. The init-variables above are created later once the lambdascope and call-operators decl-context is pushed onto its respective stack. Since the lambda init-capture's initializer expression occurs in the context of the enclosing function or lambda, therefore we can not wait till a lambda scope has been pushed on before deciding whether the variable needs to be captured. We also need to process all lvalue-to-rvalue conversions and discarded-value conversions, so that we can avoid capturing certain constant variables. For e.g., void test() { const int x = 10; auto L = [&z = x](char a) { <-- don't capture by the current lambda return [y = x](int i) { <-- don't capture by enclosing lambda return y; } }; If x was not const, the second use would require 'L' to capture, and that would be an error. Make sure TranformLambdaExpr is also aware of this. Patch approved by Richard (Thanks!!) http://llvm-reviews.chandlerc.com/D2092 llvm-svn: 196454
* Parse: Recover better from bad definitions with base specifiersDavid Majnemer2013-12-052-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | We would skip until the next comma, hoping good things whould lie there, however this would fail when we have such things as this: struct A {}; template <typename> struct D; template <> struct D<C> : B, A::D; Once this happens, we would believe that D with a nested namespace specifier of A was a variable that was being declared. We would go on to complain that there was an extraneous 'template <>' on their variable declaration. Crashes would happen when 'A' gets defined as 'enum class A {}' as various asserts would fire. Instead, we should skip up until the semicolon if we see that we are in the middle of a definition and the current token is a ':' This fixes PR17084. llvm-svn: 196453
* Provide an easy way for synthetic child provider front ends to declare ↵Enrico Granata2013-12-051-1/+16
| | | | | | | | | | | | themselves “invalid” This is not being used yet, and in practice, more refactoring would be required to make this fully practical In practice, the way this should work is that CalculateNumChildren(), GetChildAtIndex(), GetIndexOfChildWithName() and MightHaveChildren() should all default to failure values when m_valid == false. Update() should be the only function actually setting/clearing the flag upon inspecting the backend ValueObject, if it determines it to be in an incongruent state Given refactoring of the FrontEnd APIs, this work could be automatically performed without the individual providers having to replicate this logic The way this works now is that each front end picks one or more “key ivars” and keys off those to detect invalidity This is a baby step 0 to a better world llvm-svn: 196452
* Add an AdjustedType sugar node for adjusting calling conventionsReid Kleckner2013-12-0525-80/+239
| | | | | | | | | | | | | | | | Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
* Simplify the constructor to CodeGenABITypes.Mark Lacey2013-12-052-8/+12
| | | | | | | | | | | | The CodeGenOptions are not used for ABI type selection, so we will just create one with the default constructor (there is a FloatABI option in CodeGenOptions that is passed on to LLVM, but not used in Clang for LLVM IR type generation). We can use the DiagnosticsEngine on the ASTContext rather than making a client pass one in explicitly. llvm-svn: 196450
* Add FileCheck statements for r196435.Cameron McInally2013-12-052-2/+4
| | | | llvm-svn: 196449
* Compiler.h: Disable initializer list usage with clang-clReid Kleckner2013-12-051-2/+4
| | | | | | | | | Most people are using MSVC 2012, which lacks the <initializer_list> header. MSVC 2013 shipped with that header, but it has not yet been tested. If clang works with the 2013 header, then we can enable this by checking the value of _MSC_VER. llvm-svn: 196448
* Export symbols in tools that support loading plugins.Will Dietz2013-12-054-3/+3
| | | | llvm-svn: 196447
* DwarfDebug: Avoid unnecessary abbreviation lookup when emitting DIEsDavid Blaikie2013-12-052-18/+16
| | | | | | | DIEs already contain references directly to their DIEAbbrev, use that instead of looking it up based on index. llvm-svn: 196446
* DwarfDebug: Remove trivial function wrapperDavid Blaikie2013-12-052-9/+2
| | | | llvm-svn: 196445
* Make these two tests resilient in the face of compile unit sizeEric Christopher2013-12-052-4/+6
| | | | | | changes. llvm-svn: 196444
* Reject template-ids containing literal-operator-ids that have a dependentRichard Smith2013-12-056-7/+66
| | | | | | | | | nested-name-specifier, rather than crashing. (In fact, reject all literal-operator-ids that have a non-namespace nested-name-specifier). The grammar doesn't allow these in some cases, and in other cases does allow them but instantiation will always fail. llvm-svn: 196443
* 80-column.Eric Christopher2013-12-051-1/+2
| | | | llvm-svn: 196442
* Remove special handling for DW_AT_ranges support by constructing theEric Christopher2013-12-051-20/+12
| | | | | | values with the correct behavior. llvm-svn: 196441
* [mc] Fix ELF st_other flag.Logan Chien2013-12-054-9/+29
| | | | | | | | | | | | ELF_Other_Weakref and ELF_Other_ThumbFunc seems to be LLVM internal ELF symbol flags. These should not be emitted to object file. This commit defines ELF_STO_Shift for the target-defined flags for st_other, and increase the value of ELF_Other_Shift to 16. llvm-svn: 196440
* If the LLVM OBJ_DIR path contains any characters not listed in theLang Hames2013-12-051-2/+4
| | | | | | | | | | | | | | | | | | | ScalarSafeChars array in Output::scalarString (See YAMLTraits.cpp line 554 as of r196428), this test will fail: The path will be single quoted to preserve the 'unsafe' characters, which doesn't match the expected (unquoted) output. Notionally "unsafe" characters include fairly innocuous ones like the '+' symbol (I don't know enough YAML to be sure, but I suspect '+' doesn't really need to be quoted). I have added some sed lines to strip leading spaces, and leading and trailing single quote (') characters from the path. That should make this test slightly more robust. If possible, this test should be rewritten to use FileCheck, rather than diffing against expected output - the latter is likely to brittle, and require further sed goop in the future. llvm-svn: 196439
* Use present fast-math flags when applicable in CreateBinOpMichael Ilseman2013-12-052-2/+13
| | | | | | | | We were previously not adding fast-math flags through CreateBinOp() when it happened to be making a floating point binary operator. This patch updates it to do so similarly to directly calling CreateF*(). llvm-svn: 196438
* Fix comment.Eric Christopher2013-12-051-2/+2
| | | | llvm-svn: 196437
* [unwind] remove darwin build dependency on <mach-o/dyld_priv.h>Nick Kledzik2013-12-051-1/+42
| | | | llvm-svn: 196436
* Add AVX512 patterns for v16i32 broadcast and v2i64 zero extend load.Cameron McInally2013-12-053-0/+27
| | | | | | Patch by Aleksey Bader. llvm-svn: 196435
* Fix typo.Eric Christopher2013-12-041-1/+1
| | | | llvm-svn: 196434
* DwarfUnit: Correct comment by generalizing over all units, not just ↵David Blaikie2013-12-041-3/+3
| | | | | | | | compilation units. Code review feedback on r196394 by Paul Robinson. llvm-svn: 196433
* Fix a bug in darwin's 32-bit X86 handling of evaluating fixups. Kevin Enderby2013-12-042-1/+31
| | | | | | | | | | | | | | | Where it would use a scattered relocation entry but falls back to a normal relocation entry because the FixupOffset is more than 24-bits. The bug is in the X86MachObjectWriter::RecordScatteredRelocation() where it changes reference parameter FixedValue but then returns false to indicate it did not create a scattered relocation entry. The fix is simply to save the original value of the parameter FixedValue at the start of the method and restore it if we are returning false in that case. rdar://15526046 llvm-svn: 196432
* Update comment.Eric Christopher2013-12-041-1/+2
| | | | llvm-svn: 196431
* Update comment.Eric Christopher2013-12-041-1/+1
| | | | llvm-svn: 196430
* Giving a Subjects list to DllExport, which allows the removal of some custom ↵Aaron Ballman2013-12-042-9/+4
| | | | | | semantic handling. The same cannot be done for DllImport, and so comments were left explaining why. llvm-svn: 196429
* Common functionality is already checked within SemaDeclAttr.cpp and so it ↵Aaron Ballman2013-12-041-65/+4
| | | | | | does not need to be re-checked for each target. llvm-svn: 196428
* Remove incorrect comment and pointless cast.Eric Christopher2013-12-041-2/+1
| | | | llvm-svn: 196427
* const on its own line is confusing.Eric Christopher2013-12-041-2/+2
| | | | llvm-svn: 196426
* Factor duplicated code for TransformTypeInObjectScopeReid Kleckner2013-12-041-49/+22
| | | | | | Fixes the relevant FIXME about copy-pasted code. llvm-svn: 196425
* Add support for parsing ARM symbol variants on ELF targetsDavid Peixotto2013-12-0417-75/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM symbol variants are written with parens instead of @ like this: .word __GLOBAL_I_a(target1) This commit adds support for parsing these symbol variants in expressions. We introduce a new flag to MCAsmInfo that indicates the parser should use parens to parse the symbol variant. The expression parser is modified to look for symbol variants using parens instead of @ when the corresponding MCAsmInfo flag is true. The MCAsmInfo parens flag is enabled only for ARM on ELF. By adding this flag to MCAsmInfo, we are able to get rid of redundant ARM-specific symbol variants and use the generic variants instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new UseParensForSymbolVariant attribute in MCAsmInfo to correctly print the symbol variants for arm. To achive this we need to keep a handle to the MCAsmInfo in the MCSymbolRefExpr class that we can check when printing the symbol variant. Updated Tests: Changed case of symbol variant to match the generic kind. test/CodeGen/ARM/tls-models.ll test/CodeGen/ARM/tls1.ll test/CodeGen/ARM/tls2.ll test/CodeGen/Thumb2/tls1.ll test/CodeGen/Thumb2/tls2.ll PR18080 llvm-svn: 196424
* Fix for PR18052 - Lambdas within NSDMI's and default arguments in Nested ↵Faisal Vali2013-12-042-2/+71
| | | | | | | | | | | | | | | | | | | | | | classes. Clang currently croaks on the following: struct X1 { struct X2 { int L = ([] (int i) { return i; })(2); }; }; asserting that the containing lexical context of the lambda is not Sema's cur context, when pushing the lambda's decl context on. This occurs because (prior to this patch) getContainingDC always returns the non-nested class for functions at class scope (even for inline member functions of nested classes (to account for delayed parsing of their bodies)). The patch addresses this by having getContainingDC always return the lexical DC for a lambda's call operator. Link to the bug: http://llvm.org/bugs/show_bug.cgi?id=18052 Link to Richard Smith's feedback on phabricator: http://llvm-reviews.chandlerc.com/D2331 Thanks! llvm-svn: 196423
* Simplify check.Eric Christopher2013-12-041-1/+1
| | | | llvm-svn: 196422
* Reformat slightly.Eric Christopher2013-12-041-27/+45
| | | | llvm-svn: 196421
* The MSP430Interrupt attribute does have a sema handler (it's in ↵Aaron Ballman2013-12-042-1/+7
| | | | | | TargetAttributesSema). Added a FIXME about the attribute being nameless when it really does have a valid name, and a comment explaining why we're using the name instead of the attribute kind. llvm-svn: 196420
* Make RangeSpanList take a symbol for the beginning of the rangeEric Christopher2013-12-042-9/+8
| | | | | | rather than magically making the names match. llvm-svn: 196419
* Add a FIXME for making the symbol emission functions const.Eric Christopher2013-12-041-0/+2
| | | | llvm-svn: 196418
* Getting rid of some hard-coded strings. No functional changes intended, ↵Aaron Ballman2013-12-042-9/+9
| | | | | | though some test cases needed to be updated for attribute names becoming quoted. llvm-svn: 196417
* DwarfDebug: Unconditionalize trivial asm commentsDavid Blaikie2013-12-041-10/+5
| | | | | | | | While we still have a few (~4) non-trivial comments with string concatenation, etc that should remain conditionalized, these trivial literal comments can be simplified. llvm-svn: 196416
* This attribute somehow remained nameless in the attribute tablegen, until now.Aaron Ballman2013-12-042-3/+5
| | | | llvm-svn: 196415
* DwarfDebug: Reduce code duplication for sec offset emissionDavid Blaikie2013-12-042-56/+32
| | | | llvm-svn: 196414
* Patch from Todd Fiala that install the lldb.py module in the prefix ↵Greg Clayton2013-12-042-1/+6
| | | | | | directory and also makes install fail if the prefix directory can't be accessed llvm-svn: 196413
OpenPOWER on IntegriCloud