summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a crash mangling decayed val argument-typed function.Fariborz Jahanian2010-11-021-1/+3
| | | | | | // rdar: //8620510 and PR7666 llvm-svn: 118019
* Simplify. Builtin types' context is always implied.Devang Patel2010-11-012-13/+14
| | | | llvm-svn: 117928
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-3110-46/+50
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* Better solution: calculate the visibility of functions and variablesJohn McCall2010-10-305-16/+30
| | | | | | | | | | independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 llvm-svn: 117781
* Generate bitcasts going in and out of MMX parametersDale Johannesen2010-10-291-1/+10
| | | | | | | | | in asm's. PR 8501, 8602988. I don't like including Type.h where it is; the idea was to get references to X86_MMXTy out of the common code. Maybe there's a better way? llvm-svn: 117736
* Use CodeGenFunction's getContext(), for consistency.Dan Gohman2010-10-291-1/+1
| | | | llvm-svn: 117734
* Restore r117644, this time properly ignoring -fvisibility and type visibilityJohn McCall2010-10-291-17/+23
| | | | | | | | | | | | | | | for namespace-scope variable declarations. Apply visibility in IR gen to variables that are merely declared and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. llvm-svn: 117729
* After processing named unions do not fall through to handle anonymous unions.Devang Patel2010-10-291-0/+1
| | | | | | This is tested by funcargs.exp in gdb testsuite. llvm-svn: 117659
* Revert r117644, "Apply visibility in IR gen to variables that are merelyDaniel Dunbar2010-10-291-23/+17
| | | | | | declared", it breaks things. llvm-svn: 117653
* Don't assert on attempts to throw 'bool'. I wonder if in the history of C++John McCall2010-10-291-1/+1
| | | | | | anyone has ever intentionally done this outside of a compiler test case. llvm-svn: 117645
* Apply visibility in IR gen to variables that are merely declaredJohn McCall2010-10-291-17/+23
| | | | | | | | | | | | and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. llvm-svn: 117644
* Basic types are language defined builtins. They are always defined at top ↵Devang Patel2010-10-282-6/+13
| | | | | | most level. llvm-svn: 117613
* When emitting l-values for bool non-__block decl references, make a pointerJohn McCall2010-10-281-1/+1
| | | | | | | | using the memory type; fixes an assert. Fixes rdar://problem/8605032 llvm-svn: 117610
* Directly use NamespaceDecl->getLocation() to find the source file.Devang Patel2010-10-281-3/+2
| | | | llvm-svn: 117576
* Stay within 80 columns.Devang Patel2010-10-281-10/+13
| | | | llvm-svn: 117561
* Implement an indirect-goto optimization for goto *&&lbl and respect thisJohn McCall2010-10-281-0/+5
| | | | | | | | | | | | | | in the scope checker. With that done, turn an indirect goto into a protected scope into a hard error; otherwise IR generation has to start worrying about declarations not dominating their scopes, as exemplified in PR8473. If this really affects anyone, I can probably adjust this to only hard-error on possible indirect gotos into VLA scopes rather than arbitrary scopes. But we'll see how people cope with the aggressive change on the marginal feature. llvm-svn: 117539
* Fix context info for enums.Devang Patel2010-10-271-2/+4
| | | | | | Radar 8595129 llvm-svn: 117507
* Restore r117403 (fixing IR gen for bool atomics), this time being less John McCall2010-10-273-85/+131
| | | | | | | aggressive about the form we expect bools to be in. I don't really have time to fix all the sources right now. llvm-svn: 117486
* Revert r117403 as it caused PR8480.Rafael Espindola2010-10-273-128/+85
| | | | llvm-svn: 117456
* Do the guarding of instantiated static data membersFariborz Jahanian2010-10-273-25/+45
| | | | | | | | on if its linkage is weak. Currently this is the case but may change in the future. (part of radar 8562966). llvm-svn: 117452
* Also devirtualize calls to a member functions where the containing class has ↵Anders Carlsson2010-10-271-2/+7
| | | | | | been marked final. llvm-svn: 117445
* If a virtual member function has the 'final' attribute, we can devirtualize ↵Anders Carlsson2010-10-271-4/+11
| | | | | | calls to it. llvm-svn: 117444
* Patch to provide guard when initializing instancesFariborz Jahanian2010-10-262-2/+15
| | | | | | | of static data member of a class template. Fixes //rdar :// 8562966 and pr8409. llvm-svn: 117410
* Extract procedures to do scalar-to-memory and memory-to-scalar conversionsJohn McCall2010-10-263-85/+128
| | | | | | | in IR gen, and use those to fix a correctness issue with bool atomic intrinsics. rdar://problem/8461234 llvm-svn: 117403
* Factor out the code for emitting code to load vtable pointer membersDan Gohman2010-10-264-15/+16
| | | | | | so that it's done in one place. llvm-svn: 117386
* Add infrastructure for emitting TBAA metadata with the "constant" flag.Dan Gohman2010-10-252-4/+16
| | | | llvm-svn: 117328
* Trim an unnecessary #include.Dan Gohman2010-10-251-1/+0
| | | | llvm-svn: 117321
* Factor out the code for creating the Root and Char nodes, so thatDan Gohman2010-10-252-26/+37
| | | | | | they can be used outside of the main getTBAAInfo function. llvm-svn: 117320
* After discussion with Doug and John, I am revertingFariborz Jahanian2010-10-223-27/+2
| | | | | | the patch. llvm-svn: 117159
* Substantially revise how clang computes the visibility of a declaration toJohn McCall2010-10-225-76/+18
| | | | | | | | more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. llvm-svn: 117147
* Patch fixes miscompile with non-trivial copy constructors and Fariborz Jahanian2010-10-223-2/+27
| | | | | | statement expressions, //rdar: //8540501 llvm-svn: 117146
* Delay record type's debug info emission, in -flimit-debug-info mode, if ↵Devang Patel2010-10-221-1/+2
| | | | | | member expression's base is call expr. llvm-svn: 117127
* Revert unintentional check-in.Devang Patel2010-10-221-1/+1
| | | | llvm-svn: 117120
* Tidy up MIPS_linkage name. Provide it only if it does not match regular ↵Devang Patel2010-10-221-5/+18
| | | | | | | | name, otherwise it confuses debugger. This is tested by local.C in llvmgcc testsuite. llvm-svn: 117107
* More class anonymization.Benjamin Kramer2010-10-223-7/+11
| | | | llvm-svn: 117106
* Rename clang's TBAA tree root from "experimental" to "simple".Dan Gohman2010-10-211-1/+1
| | | | llvm-svn: 117046
* Add some more comments.Dan Gohman2010-10-212-4/+20
| | | | llvm-svn: 117043
* This patch implements Next's IRGen for -fconstant-string-class=class-name.Fariborz Jahanian2010-10-193-16/+28
| | | | | | PR6056, //rdar: //8564463 llvm-svn: 116819
* Fix Whitespace.Michael J. Spencer2010-10-195-126/+126
| | | | llvm-svn: 116798
* We shouldn't keep track of MMX registers "needed" separately from the SSEBill Wendling2010-10-181-21/+11
| | | | | | registers needed. llvm-svn: 116772
* Fix some bugs in local class mangling brought up in PR8355.John McCall2010-10-181-19/+21
| | | | | | Patch by Richard Smith! llvm-svn: 116752
* patch fixes class names missing from method names in debug information for Fariborz Jahanian2010-10-181-0/+2
| | | | | | synthesized property. // rdar: //8498026 llvm-svn: 116717
* Reapply r116684 with fixes. The test cases needed to be updated.Bill Wendling2010-10-181-12/+47
| | | | llvm-svn: 116696
* Temporarily revert r116684. It was causing failures with Bill Wendling2010-10-171-47/+12
| | | | | | | Clang :: CodeGen/x86_32-arguments-darwin.c Clang :: CodeGen/x86_32-arguments-linux.c llvm-svn: 116687
* The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. TheBill Wendling2010-10-171-12/+47
| | | | | | | | function parameters weren't converted to use the correct type (x86_mmx). Add a check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for that function parameter. If so, it coerces the type to be that. llvm-svn: 116684
* Coding by inspection has its problems.John McCall2010-10-161-0/+2
| | | | llvm-svn: 116672
* objc_exception_rethrow does not take an exception argument.John McCall2010-10-161-23/+9
| | | | | | rdar://problem/8535238 llvm-svn: 116663
* Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature forDaniel Dunbar2010-10-161-1/+1
| | | | | | | | objc_exception_rethrow, so we don't...", since something is actually trying to call this with the wrong signature (!). Unfortunately I don't understand the new EH infrastructure well enough to fix it immediately. llvm-svn: 116660
* IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don'tDaniel Dunbar2010-10-161-1/+1
| | | | | | generate unnecessary %al clear on x86_64. llvm-svn: 116656
* Mention the paragraphs in the standards which sanction TBAA.Dan Gohman2010-10-151-1/+5
| | | | llvm-svn: 116617
OpenPOWER on IntegriCloud