summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* The Darwin kernel does not provide useful guard variable support.John McCall2011-03-183-0/+16
| | | | | | | | Issue this as an IR-gen error; it's not really worthwhile doing this "right", i.e. in Sema, because IR gen knows a lot of tricks beyond what the constant evaluator knows. llvm-svn: 127854
* Convert alignment values to CharUnits. No change in functionality intended.Ken Dyck2011-03-181-18/+18
| | | | llvm-svn: 127848
* Convert getSizeInBytes() to getSizeInChars(), which returns its result inKen Dyck2011-03-181-9/+10
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 127846
* Convert variables to CharUnits in ConvertStructToPacked(). No change inKen Dyck2011-03-181-12/+12
| | | | | | functionality intended. llvm-svn: 127844
* Remove code that was intentionally generating bad code on the GNU runtime ↵David Chisnall2011-03-171-1/+1
| | | | | | for no reason (failing to emit .cxx_constructor / .cxx_destructor methods). llvm-svn: 127806
* Convert NextOffsetInBytes to CharUnits and rename to NextOffsetInChars. NoKen Dyck2011-03-171-36/+40
| | | | | | change in functionality intended. llvm-svn: 127787
* Politely inform GCC that we will never fall off the end of that switch.Matt Beaumont-Gay2011-03-171-0/+1
| | | | llvm-svn: 127783
* PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.Eli Friedman2011-03-161-3/+2
| | | | llvm-svn: 127768
* Fix foreign exception handling (GNU runtime).David Chisnall2011-03-161-6/+17
| | | | llvm-svn: 127736
* Don't emit read barriers for reading __weak __block variablesJohn McCall2011-03-161-4/+2
| | | | | | in non-GC mode. llvm-svn: 127725
* Reorganize the emission of (unfoldable) constant casts a bit, andJohn McCall2011-03-151-36/+97
| | | | | | | make sure that upcasts of member pointer types are covered as constants. Fixed rdar://problem/9130221 llvm-svn: 127702
* Reintroduce r127617: "Code generation for noexcept." with fixes.Sebastian Redl2011-03-151-17/+25
| | | | llvm-svn: 127685
* Introduce a CharUnits FieldOffsetInChars variable in AppendField() toKen Dyck2011-03-151-3/+7
| | | | | | | | replace some uses of FieldOffsetInBytes. The remaining uses of FieldOffsetInBytes will be replaced once NextFieldOffsetInBytes is converted to CharUnits. No change in functionality intended. llvm-svn: 127641
* Revert r127617: "Code generation for noexcept."Jakob Stoklund Olesen2011-03-151-25/+17
| | | | | | The tests fail in a -Asserts build. llvm-svn: 127635
* Switch from internal to linker_private linkage, it is sufficient to please ↵Rafael Espindola2011-03-141-1/+1
| | | | | | the new linker. llvm-svn: 127622
* Code generation for noexcept.Sebastian Redl2011-03-141-17/+25
| | | | llvm-svn: 127617
* __clear_cache() is varargs and people will occasionally write it withoutEric Christopher2011-03-141-4/+7
| | | | | | | | | arguments. Process only the arguments that people write, but process all of them. Fixes rdar://8900346 llvm-svn: 127616
* Fix link of libxul with LTO and the linker in xcode4. It is not clear if thisRafael Espindola2011-03-141-1/+4
| | | | | | | is working around a bug in ld or if the new linker has a reasonable reason for wanting the string constant to be linker visible. llvm-svn: 127594
* Fix incorrect linkage specifiers for selectors.David Chisnall2011-03-141-2/+2
| | | | llvm-svn: 127580
* Instead of storing an ASTContext* in FunctionProtoTypes with computed ↵Sebastian Redl2011-03-132-2/+2
| | | | | | noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall. llvm-svn: 127568
* Use CharUnits for argument passed to AppendPadding() from AppendBitField().Ken Dyck2011-03-121-5/+6
| | | | | | No change in functionality intended. llvm-svn: 127538
* Propagate the new exception information to FunctionProtoType.Sebastian Redl2011-03-123-6/+5
| | | | | | | | Change the interface to expose the new information and deal with the enormous fallout. Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications. Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support. llvm-svn: 127537
* Change parameter to AppendPadding from bytes to CharUnits. No change inKen Dyck2011-03-111-11/+11
| | | | | | functionality intended. llvm-svn: 127513
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-116-47/+40
| | | | llvm-svn: 127494
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-4/+5
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Convert the RecordSize parameter of AppendTailPadding() to CharUnits toKen Dyck2011-03-111-8/+6
| | | | | | | avoid converting to bits and back again. No change in functionality intended. llvm-svn: 127455
* lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on ↵NAKAMURA Takumi2011-03-101-2/+4
| | | | | | Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang. llvm-svn: 127405
* Fixed InnerLocStart.Abramo Bagnara2011-03-091-2/+2
| | | | llvm-svn: 127330
* Remove a rather egregious use of getFunctionInfo.John McCall2011-03-092-22/+13
| | | | llvm-svn: 127324
* Fix three of the four places where I left breadcrumbs to avoid unnecessaryJohn McCall2011-03-093-55/+64
| | | | | | recomputation. llvm-svn: 127322
* Tame this assert, hopefully fixing self-host.John McCall2011-03-091-1/+20
| | | | llvm-svn: 127319
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-0915-129/+151
| | | | | | | | | | simplify the logic of initializing function parameters so that we don't need both a variable declaration and a type in FunctionArgList. This also means that we need to propagate the CGFunctionInfo down in a lot of places rather than recalculating it from the FAL. There's more we can do to eliminate redundancy here, and I've left FIXMEs behind to do it. llvm-svn: 127314
* Emit block capture initializers as if they were normal initializers for a localJohn McCall2011-03-081-1/+3
| | | | | | variable that just happens to be stored in a wierd place. llvm-svn: 127235
* Extract a function to emit an arbitrary expression as if it were the initializerJohn McCall2011-03-082-54/+84
| | | | | | for a local variable. llvm-svn: 127227
* Fixed source range for all DeclaratorDecl's.Abramo Bagnara2011-03-082-4/+8
| | | | llvm-svn: 127225
* When we adjust the inline ASM type, we need to take into account an earlyBill Wendling2011-03-071-1/+1
| | | | | | | | clobber with the 'y' constraint. Otherwise, we get the wrong return type and an assert, because it created a '<1 x i64>' vector type instead of the x86_mmx type. llvm-svn: 127185
* CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just ↵Devang Patel2011-03-071-1/+4
| | | | | | like CodeGenFunction::GenerateCode() llvm-svn: 127174
* DebugInfo can be enabled or disabled at function level (e.g. using an ↵Devang Patel2011-03-078-20/+21
| | | | | | attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. llvm-svn: 127165
* Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user ↵Devang Patel2011-03-074-4/+17
| | | | | | | | | | | | | experience. 21 int main() { 22 A a; For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr. This fixes ostream-defined.exp regression from gdb testsuite. llvm-svn: 127164
* The conditional needs to be pushed before the branch. Make the test lessJohn McCall2011-03-071-78/+81
| | | | | | trivial to check this. Adjust for style. llvm-svn: 127151
* An operator new with an empty exception specifier returns null on a badJohn McCall2011-03-071-0/+8
| | | | | | | | allocation and therefore requires a null-check. We were doing that, but we weren't treating the new-initializer as being conditionally executed, which means it was possible to get ill-formed IR as in PR9298. llvm-svn: 127147
* Revert r126422 "Use private linkage to avoid symbol conflicts inDouglas Gregor2011-03-061-1/+1
| | | | | | corner cases like the one in PR9301." which caused PR9416. llvm-svn: 127136
* Correctly unwrap 'auto' types. Fixes PR9414.Anders Carlsson2011-03-061-0/+3
| | | | llvm-svn: 127121
* StringRefify.Benjamin Kramer2011-03-052-9/+10
| | | | llvm-svn: 127082
* Initialize variable.Bill Wendling2011-03-041-2/+2
| | | | llvm-svn: 127039
* Emit a stop point before a call expression so that debugger has some chance ↵Devang Patel2011-03-041-0/+7
| | | | | | | | | | of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined. = bar() + ... + bar() + ... clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here. llvm-svn: 127018
* Access ivars with inbounds GEPs, even in -fwrapv. It's unlikely thatJohn McCall2011-03-041-1/+1
| | | | | | | this can have any optimization effect, given the opacity of objects pointers, but you never know. llvm-svn: 126990
* Let's do super message sends with static allocas instead of dynamic ones.John McCall2011-03-041-2/+2
| | | | llvm-svn: 126989
* Make AttributedTypes for GC-qualified types and fix some miscellaneousJohn McCall2011-03-041-0/+1
| | | | | | | bugs with such types. Not sure this is quite how I want the desugaring and a.k.a. logic to go, but it suffices. llvm-svn: 126986
* Encode argument numbering in debug info so that code generator can emit them ↵Devang Patel2011-03-035-20/+27
| | | | | | | | in order. This fixes few blocks.exp regressions. llvm-svn: 126960
OpenPOWER on IntegriCloud