summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Teach debug-info generation that SourceManager::getPresumedLoc() canDouglas Gregor2010-11-111-7/+9
| | | | | | | produce an invalid location even when given a valid location, if the file system has changed underneath us. Recovery more gracefully. llvm-svn: 118834
* Adding couple of Block API, a bug fix andFariborz Jahanian2010-11-112-4/+9
| | | | | | a test change, all for blocks. wip. llvm-svn: 118745
* Add a variant of GCC-style vector types for ARM NEON.Bob Wilson2010-11-101-2/+2
| | | | | | | | | NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum. llvm-svn: 118724
* Use the right calling convention when mangling names in the Microsoft C++Charles Davis2010-11-091-4/+8
| | | | | | | | mangler. Now member functions and pointers thereof have their calling convention mangled as __thiscall if they have the default CC (even though, they technically still have the __cdecl CC). llvm-svn: 118598
* Remove the use of aliases in outputted code from ObjC (GNU runtime).David Chisnall2010-11-091-4/+6
| | | | llvm-svn: 118498
* Remove debugging printf.Nick Lewycky2010-11-091-3/+0
| | | | | | Fix linux build. llvm-svn: 118497
* Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as ↵Anders Carlsson2010-11-092-12/+122
| | | | | | a first step towards fixing PR6995. llvm-svn: 118491
* Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.Argyrios Kyrtzidis2010-11-091-7/+4
| | | | | | Fixes rdar://8644873 & http://llvm.org/PR8567. llvm-svn: 118468
* When re-using a vtable slot for the nearest overridden method, just becauseJohn McCall2010-11-091-1/+10
| | | | | | | | | | | | there's no return adjustment from the overridden to the overrider doesn't mean there isn't a return adjustment from the overrider to the final overrider. This matters if we're emitting a virtual this-adjustment thunk because the overrider virtually inherits from the class providing the nearest overridden method. Do the appropriate return adjustment in this case. Fixes PR7611. llvm-svn: 118466
* Remove broken support for variadic templates, along with the variousDouglas Gregor2010-11-071-2/+2
| | | | | | | | | | | | | abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. llvm-svn: 118385
* ARM EH uses a different personality function in C.John McCall2010-11-072-0/+4
| | | | llvm-svn: 118366
* Simplify the logic for emitting guard variables for template staticJohn McCall2010-11-068-47/+53
| | | | | | | | | data members by delaying the emission of the initializer until after linkage and visibility have been set on the global. Also, don't emit a guard unless the variable actually ends up with vague linkage, and don't use thread-safe statics in any case. llvm-svn: 118336
* std::nullptr_t is a fundamental type for RTTI purposes.Anders Carlsson2010-11-041-18/+16
| | | | llvm-svn: 118238
* Mangle std::nullptr_t as specified by the Itanium C++ ABI.Anders Carlsson2010-11-041-3/+2
| | | | llvm-svn: 118236
* Some fixes for synthesized ivar metadata (GNU runtime).David Chisnall2010-11-032-12/+20
| | | | llvm-svn: 118172
* Ensure that static local variables in function templates inherit theJohn McCall2010-11-023-1/+16
| | | | | | visibility of their function. llvm-svn: 118065
* 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
OpenPOWER on IntegriCloud