summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenAction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-6/+6
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Turn FrontendInputFile into an immutable class and have it also acceptArgyrios Kyrtzidis2012-11-091-1/+1
| | | | | | a memory buffer instead of only a filename. llvm-svn: 167627
* Have the parser initialize Sema before it consumes the firstDouglas Gregor2012-11-051-1/+3
| | | | | | | | token. This is important because the first token could actually be after an #include that triggers a module import, which might use either Sema or the AST consumer before it would have been initialized. llvm-svn: 167423
* Escape % in diagnostic message when compiling LLVM IR.Benjamin Kramer2012-03-161-1/+11
| | | | | | | % is a common character in IR so we'd crash on almost any malformed IR. The diagnostic formatter expects a formatting directive when it sees an unescaped %. llvm-svn: 152956
* Replace MarkVarRequired with a more genericRafael Espindola2012-03-081-2/+2
| | | | | | HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. llvm-svn: 152320
* Fix a small difference in sema and codegen views of what needs to be output.Rafael Espindola2012-03-051-0/+4
| | | | | | | | | | | | In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. llvm-svn: 152024
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-051-3/+3
| | | | llvm-svn: 149798
* Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis2012-02-011-2/+5
| | | | | | | | | | | | | | | | | commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
* ConstantArray::get() (for strings) is going away, useChris Lattner2012-01-311-5/+2
| | | | | | | | | | | | ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149363
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+9
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier2011-12-141-4/+0
| | | | | | free function. llvm-svn: 146530
* Add frontend flags to enable bitcode verifier pass.Chad Rosier2011-12-121-0/+4
| | | | llvm-svn: 146441
* Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor2011-11-301-1/+1
| | | | | | | | | library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). llvm-svn: 145538
* Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis2011-11-181-1/+3
| | | | | | parsing or false to abort parsing. llvm-svn: 144943
* Add support for lazily linking bitcode files (using a newPeter Collingbourne2011-10-301-6/+53
| | | | | | | -mlink-bitcode-file flag), and more generally llvm::Modules, before running optimisations. llvm-svn: 143314
* Convert inline asm source ranges into clang SourceRanges and print them with ↵Benjamin Kramer2011-10-161-2/+11
| | | | | | | | | | | | | | the instantiated note. t.c:2:7: error: invalid operand for instruction asm("movl 0(%rax), 0(%edx)"); ^ <inline asm>:1:16: note: instantiated into assembly here movl 0(%rax), 0(%edx) ^~~~~~~ 1 error generated. llvm-svn: 142131
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-4/+4
| | | | llvm-svn: 140478
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-1/+0
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* In CodeGenAction::ExecuteAction() use SourceManager::translateFileLineCol()Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | instead of getLocation() since we don't care about expanded macro arguments. llvm-svn: 140061
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-7/+7
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Add the ObjC ARC optimization passes manually, now that they're notDan Gohman2011-07-051-3/+9
| | | | | | hardwired into the default pass list. llvm-svn: 134445
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-12/+28
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-28/+12
| | | | llvm-svn: 126050
* Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenActionPeter Collingbourne2011-02-181-12/+28
| | | | | | | | | This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the dependency on core from libclang, PrintFunctionNames, the unit tests and c-index-test. While at it, review and trim other unneeded dependencies. llvm-svn: 125820
* Add -add-plugin flag, which runs plugins in addition to codegen.Nico Weber2011-01-251-9/+8
| | | | llvm-svn: 124227
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-3/+2
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* adjust for llvm mainline, yay type safetyChris Lattner2010-11-171-3/+3
| | | | llvm-svn: 119487
* Break Frontend's dependency on Rewrite, Checker and CodeGen in shared ↵Daniel Dunbar2010-06-151-0/+348
library configuration Currently, all AST consumers are located in the Frontend library, meaning that in a shared library configuration, Frontend has a dependency on Rewrite, Checker and CodeGen. This is suboptimal for clients which only wish to make use of the frontend. CodeGen in particular introduces a large number of unwanted dependencies. This patch breaks the dependency by moving all AST consumers with dependencies on Rewrite, Checker and/or CodeGen to their respective libraries. The patch therefore introduces dependencies in the other direction (i.e. from Rewrite, Checker and CodeGen to Frontend). After applying this patch, Clang builds correctly using CMake and shared libraries ("cmake -DBUILD_SHARED_LIBS=ON"). N.B. This patch includes file renames which are indicated in the patch body. Changes in this revision of the patch: - Fixed some copy-paste mistakes in the header files - Modified certain aspects of the coding to comply with the LLVM Coding Standards llvm-svn: 106010
OpenPOWER on IntegriCloud