summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Just bail out immediately when emitting an unreachable function-local staticJohn McCall2010-05-031-0/+3
| | | | | | variable. Surprisingly, this does seem to be the right way to solve this. llvm-svn: 102961
* Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall.Anders Carlsson2010-05-021-2/+4
| | | | llvm-svn: 102882
* I hate default statements. Fixes PR6874.Douglas Gregor2010-04-231-4/+38
| | | | llvm-svn: 102160
* Some renaming of methods, fixes typoFariborz Jahanian2010-04-191-1/+2
| | | | | | (related to PR6769). llvm-svn: 101794
* Local static variables must be available module-wiseFariborz Jahanian2010-04-181-0/+1
| | | | | | | as they are accessible in static methods in a class local to the same function. Fixes PR6769. llvm-svn: 101756
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-041-4/+10
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-021-10/+4
| | | | llvm-svn: 100200
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-021-4/+10
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.Bob Wilson2010-03-301-10/+4
| | | | llvm-svn: 99949
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-4/+10
| | | | | | memmove, and memset llvm-svn: 99930
* Change CodeGenModule to rely on the Module's symbol table instead ofJohn McCall2010-03-191-5/+10
| | | | | | | | | | | | | shadowing it in the GlobalDeclMap. Eliminates the string-uniquing requirement for mangled names, which should help C++ codegen times a little. Forces us to do string lookups instead of pointer lookups, which might hurt codegen times a little across the board. We'll see how it plays out. Removing the string-uniquing requirement implicitly fixes any bugs like PR6635 which arose from the fact that we had multiple uniquing tables for different kinds of identifiers. llvm-svn: 99012
* Fix a rare corner case bug which exposed a serious block API generationFariborz Jahanian2010-03-121-62/+62
| | | | | | | | | | | when initialized variable is a byref block variable and is referenced recursively in the initializer (you guessed it, it is block implementation of fibonacci number). Fix, on the other hand is trvial, by generating the API for byref variable before API for its initializer. We will have this test added to our internal test suite as a clang-style test is not possible due to very convoluted IR sequence. Fixes radar 7745514. llvm-svn: 98393
* set alignment on static locals properly, patch by Arnaud de Grandmaison!Chris Lattner2010-03-101-0/+2
| | | | llvm-svn: 98204
* IRgen: Add CreateMemTemp, for creating an temporary memory object for a ↵Daniel Dunbar2010-02-091-2/+1
| | | | | | | | | | particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing. - This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome! PR6240. llvm-svn: 95648
* Reapply r95393, without the change to CGExpr. I was wrong in assuming that theDaniel Dunbar2010-02-081-16/+10
| | | | | | element type always matched the converted LLVM type for ExprType. llvm-svn: 95596
* Use the right linkage for static variables inside C++ inline functions.Anders Carlsson2010-02-071-6/+19
| | | | llvm-svn: 95512
* Revert r95393, which broke Clang's self-host.Douglas Gregor2010-02-051-10/+16
| | | | llvm-svn: 95430
* IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases thatDaniel Dunbar2010-02-051-16/+10
| | | | | | | | need to deal with aggregates specially; this is consistent with the rest of IRgen. Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString. llvm-svn: 95393
* Revert the new reference binding code; I came up with a way simpler solution ↵Anders Carlsson2010-02-031-5/+1
| | | | | | for the reference binding bug that is preventing self-hosting. llvm-svn: 95223
* Start creating CXXBindReferenceExpr nodes when binding complex types to ↵Anders Carlsson2010-01-311-0/+4
| | | | | | references. llvm-svn: 94964
* Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,Ken Dyck2010-01-271-13/+16
| | | | | | | now that the "InBytes" part of the name is implied by the return type, rename it to getDeclAlign(). llvm-svn: 94681
* Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store sizeKen Dyck2010-01-261-2/+1
| | | | | | of LLVM types in character units. llvm-svn: 94542
* Make sure to always mark a global variable as not being constant if it has a ↵Anders Carlsson2010-01-261-1/+6
| | | | | | C++ initializer. llvm-svn: 94504
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-111-1/+1
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* Pass ReturnValueSlot to EmitCall. No functionality change yet.Anders Carlsson2009-12-241-2/+2
| | | | llvm-svn: 92138
* Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file toKen Dyck2009-12-221-0/+1
| | | | | | avoid #including CharUnits.h in ASTContext.h. llvm-svn: 91903
* Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to theKen Dyck2009-12-181-1/+2
| | | | | | | new opaque value type, CharUnits. This will help us avoid accidentally mixing quantities that are in bit and character units. llvm-svn: 91689
* Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()Ken Dyck2009-12-181-1/+1
| | | | | | | and getTypeSizeInChars() to reflect their basis in character type units, not that of a possibly independent architecture-specific byte. llvm-svn: 91688
* Add cleanups for exceptional edges. WIP.Mike Stump2009-12-091-27/+62
| | | | llvm-svn: 90940
* Use StringRef in CGDebugInfo::EmitFunctionStart.Benjamin Kramer2009-12-081-1/+1
| | | | llvm-svn: 90856
* Use a Twine to concatenate the name instead of going through std::string.Benjamin Kramer2009-12-081-3/+1
| | | | llvm-svn: 90854
* implement rdar://7346691 by codegen'ing struct/array initializersChris Lattner2009-12-051-61/+118
| | | | | | to a memset or a memcpy from a global when possible. llvm-svn: 90658
* simplify a condition and add a testcase.Chris Lattner2009-12-051-8/+10
| | | | llvm-svn: 90652
* Handle static_assert inside functions.Anders Carlsson2009-12-031-0/+1
| | | | llvm-svn: 90461
* Add missing branch to exit. Seemingly obvious when I look at theMike Stump2009-12-021-0/+3
| | | | | | code, but to track this down was laborious. llvm-svn: 90356
* Don't pass false (default) for isVolatile parameter to CreateLoad.Daniel Dunbar2009-11-291-1/+1
| | | | llvm-svn: 90098
* Rename CleanupScope -> DelayedCleanupBlock. No functionality change.Douglas Gregor2009-11-241-5/+5
| | | | llvm-svn: 89769
* Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.Daniel Dunbar2009-11-231-2/+6
| | | | llvm-svn: 89633
* Trim whitespace.Mike Stump2009-11-181-1/+0
| | | | llvm-svn: 89219
* Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.Chandler Carruth2009-11-121-2/+2
| | | | | | This resolves the layering violation where CodeGen depended on Frontend. llvm-svn: 86998
* Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass ofDouglas Gregor2009-11-091-1/+1
| | | | | | | ArrayType>()) does not instantiate. Update all callers that used this unsafe feature to use the appropriate ASTContext::getAs*ArrayType method. llvm-svn: 86596
* This patch extends CleanupScope to support destructionFariborz Jahanian2009-11-041-3/+7
| | | | | | of array objects on block exit. Patch is by Anders Calrsson. llvm-svn: 86032
* Merge constant array and structures. This will create a global variables for ↵Tanya Lattner2009-11-041-0/+15
| | | | | | arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants. llvm-svn: 85991
* Refine volatile handling, specifically, we must have the canonicalMike Stump2009-11-031-5/+7
| | | | | | | type to look at the volatile specifier. I found these all from just hand auditing the code. llvm-svn: 85967
* Patch for destruction of array of objects on block exit.Fariborz Jahanian2009-10-291-4/+13
| | | | llvm-svn: 85512
* Fix 80-col violation.Mike Stump2009-10-211-2/+2
| | | | llvm-svn: 84719
* ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085Nuno Lopes2009-10-161-0/+1
| | | | llvm-svn: 84255
* Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer2009-10-131-6/+3
| | | | llvm-svn: 83964
* Revert 83567.Devang Patel2009-10-091-6/+3
| | | | llvm-svn: 83676
* Record location info before emiting alloca for arguments. This allows ↵Devang Patel2009-10-081-3/+6
| | | | | | arguments to have proper location info. llvm-svn: 83567
OpenPOWER on IntegriCloud