hanchenye-llvm-project/clang/lib/Frontend
Daniel Dunbar 6f8362c6bf Frontend: Add CodeGenAction support for handling LLVM IR.
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.

For example, 'llvm-as' is:
  $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
  $ clang -cc1 -emit-llvm    FOO.bc -o -
and 'opt' is, e.g.:
  $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
  $ clang -cc1 -S -o - FOO.ll

The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).

llvm-svn: 105583
2010-06-07 23:27:59 +00:00
..
ASTConsumers.cpp Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. 2010-04-17 09:33:03 +00:00
ASTMerge.cpp FrontendAction: Track active file kind. 2010-06-07 23:25:49 +00:00
ASTUnit.cpp Frontend: Add FrontendAction support for handling LLVM IR inputs. 2010-06-07 23:26:47 +00:00
AnalysisConsumer.cpp Add option '-analyzer-max-loop', which specifies the maximum 2010-05-18 00:28:37 +00:00
BackendUtil.cpp Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always 2010-06-07 23:21:04 +00:00
BoostConAction.cpp When we encounter a non-dependent type during template instantiation, 2010-05-07 23:12:07 +00:00
CMakeLists.txt Frontend: Factor clang::EmitBackendOutput out of CodeGenAction. 2010-06-07 23:20:08 +00:00
CacheTokens.cpp push some source location information down through the compiler, 2010-04-20 20:35:58 +00:00
CodeGenAction.cpp Frontend: Add CodeGenAction support for handling LLVM IR. 2010-06-07 23:27:59 +00:00
CompilerInstance.cpp Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs. 2010-06-07 23:23:50 +00:00
CompilerInvocation.cpp Frontend: Add FrontendAction support for handling LLVM IR inputs. 2010-06-07 23:26:47 +00:00
DeclXML.cpp "this patch properly addresses escaping < and > which might appear 2010-05-12 23:27:11 +00:00
DependencyFile.cpp PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor. 2010-03-23 05:09:10 +00:00
DiagChecker.cpp Kill a few more random stderr uses. 2009-12-03 09:14:02 +00:00
DocumentXML.cpp Improved -ast-print-xml for C++, from Sebastien Binet! 2010-05-10 17:43:18 +00:00
FixItRewriter.cpp Switch this to new API. 2010-04-24 22:31:36 +00:00
FrontendAction.cpp Frontend: Add FrontendAction support for handling LLVM IR inputs. 2010-06-07 23:26:47 +00:00
FrontendActions.cpp Teach clang -fixit to modify files in-place, or -fixit=suffix to create new 2010-04-24 01:30:46 +00:00
FrontendOptions.cpp Frontend: Add FrontendAction support for handling LLVM IR inputs. 2010-06-07 23:26:47 +00:00
GeneratePCH.cpp Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend. 2009-11-28 10:07:24 +00:00
HTMLDiagnostics.cpp Reinstate my CodeModificationHint -> FixItHint renaming patch, without 2010-03-31 17:46:05 +00:00
HTMLPrint.cpp Fix for PR4642: move work in HTMLPrinter out of the destructor. 2009-12-12 03:36:52 +00:00
InitHeaderSearch.cpp Add ARM paths for debian. Not enough to bootstrap on a beagle board, but 2010-06-04 14:28:10 +00:00
InitPreprocessor.cpp Add several more predefines from modern versions of GCC. 2010-05-28 00:27:15 +00:00
LangStandards.cpp rename llvm::llvm_report_error -> llvm::report_fatal_error 2010-04-07 22:58:06 +00:00
Makefile Allow users to set CPPFLAGS and CXXFLAGS on the make command line. 2010-03-12 22:55:16 +00:00
PCHReader.cpp Fix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric! 2010-06-02 15:47:10 +00:00
PCHReaderDecl.cpp Added AccessSpecDecl node. 2010-06-05 05:09:32 +00:00
PCHReaderStmt.cpp Added a field to BlockDeclRefExpr for future use. 2010-06-04 19:06:53 +00:00
PCHWriter.cpp AST: Add AlignMac68kAttr, not yet used. 2010-05-27 02:25:39 +00:00
PCHWriterDecl.cpp Added AccessSpecDecl node. 2010-06-05 05:09:32 +00:00
PCHWriterStmt.cpp Added a field to BlockDeclRefExpr for future use. 2010-06-04 19:06:53 +00:00
PlistDiagnostics.cpp Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter' 2010-01-25 17:10:22 +00:00
PrintParserCallbacks.cpp Propagate access specifiers to anonymous union members nested within classes. 2010-05-21 20:45:30 +00:00
PrintPreprocessedOutput.cpp push some source location information down through the compiler, 2010-04-20 20:35:58 +00:00
RewriteMacros.cpp push some source location information down through the compiler, 2010-04-20 20:35:58 +00:00
RewriteObjC.cpp Refactoring of block-pointer type rewrite. 2010-05-25 17:12:52 +00:00
RewriteTest.cpp Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
StmtXML.cpp Completely reimplement __builtin_offsetof, based on a patch by Roberto 2010-04-28 22:16:22 +00:00
TextDiagnosticBuffer.cpp Add TextDiagnosticBuffer::FlushDiagnostics, for forwarding the buffered diagnostics to a different diagnostics engine. 2009-11-30 08:41:34 +00:00
TextDiagnosticPrinter.cpp when too many errors are emitted, and we produce: 2010-05-24 18:37:03 +00:00
TypeXML.cpp Use the llvm coding convention for indentation for switch. 2010-01-20 02:03:14 +00:00
VerifyDiagnosticsClient.cpp add regex support for -verify mode. You can now do things like 2010-04-28 20:02:30 +00:00
Warnings.cpp Introduce a limit on the depth of the template instantiation backtrace 2010-04-20 07:18:24 +00:00