aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko1-1/+1
brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
2013-01-02Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth1-2/+2
reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-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
2012-11-09Turn FrontendInputFile into an immutable class and have it also acceptArgyrios Kyrtzidis1-1/+1
a memory buffer instead of only a filename. llvm-svn: 167627
2012-11-05Have the parser initialize Sema before it consumes the firstDouglas Gregor1-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
2012-03-16Escape % in diagnostic message when compiling LLVM IR.Benjamin Kramer1-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
2012-03-08Replace MarkVarRequired with a more genericRafael Espindola1-2/+2
HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. llvm-svn: 152320
2012-03-05Fix a small difference in sema and codegen views of what needs to be output.Rafael Espindola1-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
2012-02-05Basic: import OwningPtr<> into clang namespaceDylan Noblesmith1-3/+3
llvm-svn: 149798
2012-02-01Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis1-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
2012-01-31ConstantArray::get() (for strings) is going away, useChris Lattner1-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
2011-12-20Unweaken vtables as per ↵David Blaikie1-0/+9
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
2011-12-14Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier1-4/+0
free function. llvm-svn: 146530
2011-12-12Add frontend flags to enable bitcode verifier pass.Chad Rosier1-0/+4
llvm-svn: 146441
2011-11-30Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor1-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
2011-11-18Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis1-1/+3
parsing or false to abort parsing. llvm-svn: 144943
2011-10-30Add support for lazily linking bitcode files (using a newPeter Collingbourne1-6/+53
-mlink-bitcode-file flag), and more generally llvm::Modules, before running optimisations. llvm-svn: 143314
2011-10-16Convert inline asm source ranges into clang SourceRanges and print them with ↵Benjamin Kramer1-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
2011-09-25Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie1-4/+4
llvm-svn: 140478
2011-09-23Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie1-1/+0
llvm-svn: 140407
2011-09-23Switch assert(0/false) llvm_unreachable.David Blaikie1-1/+1
llvm-svn: 140367
2011-09-19In CodeGenAction::ExecuteAction() use SourceManager::translateFileLineCol()Argyrios Kyrtzidis1-1/+1
instead of getLocation() since we don't care about expanded macro arguments. llvm-svn: 140061
2011-09-19Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis1-1/+1
It already works (and is useful with) macro locs as well. llvm-svn: 140057
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner1-7/+7
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2011-07-05Add the ObjC ARC optimization passes manually, now that they're notDan Gohman1-3/+9
hardwired into the default pass list. llvm-svn: 134445
2011-04-15fix a bunch of comment typos found by codespell. Patch byChris Lattner1-1/+1
Luis Felipe Strano Moraes! llvm-svn: 129559
2011-02-19Re-instate r125819 and r125820 with no functionality changePeter Collingbourne1-12/+28
llvm-svn: 126060
2011-02-19Revert 125820 and 125819 to fix PR9266.Rafael Espindola1-28/+12
llvm-svn: 126050
2011-02-18Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenActionPeter Collingbourne1-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
2011-01-25Add -add-plugin flag, which runs plugins in addition to codegen.Nico Weber1-9/+8
llvm-svn: 124227
2010-11-18Refactoring of Diagnostic class.Argyrios Kyrtzidis1-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
2010-11-17adjust for llvm mainline, yay type safetyChris Lattner1-3/+3
llvm-svn: 119487
2010-06-15Break Frontend's dependency on Rewrite, Checker and CodeGen in shared ↵Daniel Dunbar1-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