summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix build from r67476 and address the easy part of Doug's comments on rvalue ↵Sebastian Redl2009-03-222-8/+10
| | | | | | refs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67480 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR3200 by making alias emission use the new infrastructure. Fold Chris Lattner2009-03-224-32/+30
| | | | | | | some tests into the alias.c file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479 91177308-0d34-0410-b5e6-96231b3b80d8
* pull "runtime globals" into the same framework as other functions/global ↵Chris Lattner2009-03-225-162/+132
| | | | | | | | | variables. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Eli Friedman2009-03-221-41/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477 91177308-0d34-0410-b5e6-96231b3b80d8
* Disallow abstract types where appropriate.Anders Carlsson2009-03-225-4/+94
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a fixme: non-proto struct returning function definitions should be compiledChris Lattner2009-03-222-5/+12
| | | | | | | | | | | to something like: define void @bar(%struct.foo* noalias sret %agg.result) nounwind { instead of: define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind { git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475 91177308-0d34-0410-b5e6-96231b3b80d8
* add some missing type predicates.Chris Lattner2009-03-221-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67474 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR3859: crash with 'cc -V'Nuno Lopes2009-03-221-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472 91177308-0d34-0410-b5e6-96231b3b80d8
* PTHManager::Create():Ted Kremenek2009-03-223-21/+26
| | | | | | | | | | | | - Make the Diagnostic::Level for PTH errors to be specified by the caller clang (driver): - Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth (a hard error) and Diagnostic::Warning for -token-cache (we can still proceed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67462 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of whether a class is abstract or not. This is currently only ↵Anders Carlsson2009-03-228-6/+131
| | | | | | used for the __is_abstract type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
* don't set the name of a call instruction to "call" in release-asserts Chris Lattner2009-03-222-11/+10
| | | | | | | build. This shaves another 3% off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460 91177308-0d34-0410-b5e6-96231b3b80d8
* fix CreateTempAlloca to not set a name on the alloca for temporariesChris Lattner2009-03-223-6/+11
| | | | | | | | | | in release-assert builds. For automatic variables, explicitly set a name with setName that does not make a temporary std::string. This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6% git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459 91177308-0d34-0410-b5e6-96231b3b80d8
* set function/global names with setName instead of passing the name into theChris Lattner2009-03-221-2/+4
| | | | | | | | ctor function. This avoids creating a temporary std::string for the name, speeding up the testcase in PR3810 by 3.8% git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some warnings in release-assert mode.Chris Lattner2009-03-221-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67456 91177308-0d34-0410-b5e6-96231b3b80d8
* fix testChris Lattner2009-03-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67455 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup codegen for nested block literals so that we generateMike Stump2009-03-213-8/+14
| | | | | | | copy_helpers and dispose_helpers as necessary for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67453 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a thinko in the pre-allocation strategy for structured initializerDouglas Gregor2009-03-211-2/+10
| | | | | | | | | | | lists. The code wasn't accounting for the distinction between the top-level call to getStructuredSubobjectInit and later calls that occur deeper in the hierarchy. This problem manifested itself as over-allocation in cases where we have large arrays of small structures (<rdar://problem/6707362>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67452 91177308-0d34-0410-b5e6-96231b3b80d8
* Issue error if variables are defined inside an objc class,Fariborz Jahanian2009-03-217-57/+39
| | | | | | | category or protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Handle empty input on stdin.Daniel Dunbar2009-03-211-1/+9
| | | | | | | | | | | - PR3854. I think it makes more sense to change MemoryBuffer::getSTDIN (return 0 should indicate error, not empty), but it is documented to return 0 for empty inputs, and some other code appears to rely on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67449 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Handle empty input on stdin.Daniel Dunbar2009-03-211-0/+3
| | | | | | | | | | | - PR3854. I think it makes more sense to change MemoryBuffer::getSTDIN (return 0 should indicate error, not empty), but it is documented to return 0 for empty inputs, and some other code appears to rely on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67448 91177308-0d34-0410-b5e6-96231b3b80d8
* now that all the decl reference and creation stuff is going through twoChris Lattner2009-03-212-41/+74
| | | | | | | | very simple places, reimplement the deferred decl emission logic to not be O(N^2), fixing PR3810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67447 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash that could occur when a variable declaration became aChris Lattner2009-03-213-43/+72
| | | | | | | function definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify and cleanup global variable creation stuff to all go through oneChris Lattner2009-03-213-69/+84
| | | | | | | code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify management of llvm::Function creation to all go throughChris Lattner2009-03-212-64/+48
| | | | | | | GetAddrOfFunction. This is simpler and more efficient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444 91177308-0d34-0410-b5e6-96231b3b80d8
* code cleanups, rename EmitForwardFunctionDefinition -> Chris Lattner2009-03-212-46/+47
| | | | | | | | CreateFunctionPrototypeIR, though my next patch will eliminate it entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67443 91177308-0d34-0410-b5e6-96231b3b80d8
* fix several problems with asm renaming, by pulling it into the mangling code:Chris Lattner2009-03-214-27/+38
| | | | | | | | | | 1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo") 2. multiple definitions were conflicting, they weren't getting merged. 3. the code was duplicated in several places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67442 91177308-0d34-0410-b5e6-96231b3b80d8
* add some fixmesChris Lattner2009-03-211-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67441 91177308-0d34-0410-b5e6-96231b3b80d8
* reduce redundant calls of getMangledName.Chris Lattner2009-03-211-8/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67440 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some more code.Chris Lattner2009-03-212-28/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67439 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify and comment some code better. Make BindRuntimeGlobalsChris Lattner2009-03-213-26/+35
| | | | | | | more optimistic that it will work (optimizing for the common case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67438 91177308-0d34-0410-b5e6-96231b3b80d8
* random code cleanups.Chris Lattner2009-03-211-14/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67437 91177308-0d34-0410-b5e6-96231b3b80d8
* remove obviously dead code: you can't bitcast a pointer to "Ty" (a function ↵Chris Lattner2009-03-211-5/+1
| | | | | | type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67436 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid making constant folding logic eliminate obviously dead bitcasts, ↵Chris Lattner2009-03-211-2/+7
| | | | | | | | | speeding up PR3810 by ~2%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67434 91177308-0d34-0410-b5e6-96231b3b80d8
* continue dancing around the obvious algorithm issues in PR3810:Chris Lattner2009-03-211-1/+11
| | | | | | | | | This speeds up getAsIdentifierInfo from being a call to a function with a big switch to a single testl instruction. This speeds up the example in PR3810 by 6.2% git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67433 91177308-0d34-0410-b5e6-96231b3b80d8
* add an assertion for unreachable code.Chris Lattner2009-03-212-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67432 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a fast path to CodeGenModule::getMangledName for almost all C functions,Chris Lattner2009-03-211-2/+8
| | | | | | | speeding up the testcase in PR3810 by 60%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67431 91177308-0d34-0410-b5e6-96231b3b80d8
* partially inline getAttrs() to speed up PR3810 (and lots ofChris Lattner2009-03-212-6/+9
| | | | | | | other code presumably) by 4.3% git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67430 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify CXXNameMangler::mangle, making it exit earlier for C functions.Chris Lattner2009-03-211-31/+32
| | | | | | | | This speeds up a testcase in 3810 by ~16%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67429 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Give Compilation::Execute total control over the Driver resultDaniel Dunbar2009-03-213-8/+10
| | | | | | | | code; and don't return an error code when -### is present, even if errors occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back warning about a PTH file not containing any identifiers, but don't makeTed Kremenek2009-03-211-0/+6
| | | | | | | it a hard error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67424 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow PTH files with no identifiers.Ted Kremenek2009-03-211-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67423 91177308-0d34-0410-b5e6-96231b3b80d8
* When building the structured initializer list, pre-allocate storage inDouglas Gregor2009-03-203-0/+34
| | | | | | | | | | | | | its vectors based on the subobject type we're initializing and the (unstructured) initializer list. This eliminates some malloc thrashing when parsing initializers (from 117 vector reallocations down to 0 when parsing Cocoa.h). We can't always pre-allocate the right amount of storage, since designated initializers can cause us to initialize in non-predictable patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421 91177308-0d34-0410-b5e6-96231b3b80d8
* ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.Daniel Dunbar2009-03-202-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67420 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix include-pth.c test case to (hopefully) more resilient to where and how testsTed Kremenek2009-03-201-1/+2
| | | | | | | are executed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67419 91177308-0d34-0410-b5e6-96231b3b80d8
* ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.Daniel Dunbar2009-03-206-3/+48
| | | | | | | | | | | - <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp semantics correctly (but clang supports it) - This is sad, because it requires a fairly useless target hook. C'est la vie. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67418 91177308-0d34-0410-b5e6-96231b3b80d8
* Destroy expressions properly when resizing an initializer listDouglas Gregor2009-03-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67417 91177308-0d34-0410-b5e6-96231b3b80d8
* InitListDesignations hasn't been used (ever). Eliminate it, andDouglas Gregor2009-03-207-131/+39
| | | | | | | | | simplify the parsing and action interface for designated initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate post-diagnostic hooks. Instead, implement a Sema-specificDouglas Gregor2009-03-205-91/+60
| | | | | | | | variant of DiagnosticBuilder that emits the template instantiation backtrace when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
* ccc: Use -include-pth.Daniel Dunbar2009-03-201-25/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67410 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix codegen for support for super inside block literal expressions.Mike Stump2009-03-205-7/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67406 91177308-0d34-0410-b5e6-96231b3b80d8