Mercurial > hg > CbC > CbC_llvm
changeset 6:c8782e147cac
We became to give clang .cbc file
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 14 Jun 2013 16:49:18 +0900 |
parents | 7a2c806705bf |
children | eac3edb8778b |
files | tools/clang/include/clang/Driver/Types.def tools/clang/lib/Driver/Types.cpp tools/clang/lib/Frontend/CompilerInvocation.cpp tools/clang/lib/Parse/ParseStmt.cpp |
diffstat | 4 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/clang/include/clang/Driver/Types.def Fri Jun 07 20:03:58 2013 +0900 +++ b/tools/clang/include/clang/Driver/Types.def Fri Jun 14 16:49:18 2013 +0900 @@ -51,6 +51,9 @@ TYPE("objective-c++-cpp-output", PP_ObjCXX, INVALID, "mii", "u") TYPE("objc++-cpp-output", PP_ObjCXX_Alias, INVALID, "mii", "u") TYPE("objective-c++", ObjCXX, PP_ObjCXX, "mm", "u") +#ifndef noCbC +TYPE("cbc", CbC, PP_C, "cbc", "u") +#endif // C family input files to precompile. TYPE("c-header-cpp-output", PP_CHeader, INVALID, "i", "p")
--- a/tools/clang/lib/Driver/Types.cpp Fri Jun 07 20:03:58 2013 +0900 +++ b/tools/clang/lib/Driver/Types.cpp Fri Jun 14 16:49:18 2013 +0900 @@ -89,6 +89,9 @@ case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader: case TY_AST: case TY_ModuleFile: case TY_LLVM_IR: case TY_LLVM_BC: +#ifndef noCbC + case TY_CbC: +#endif return true; } } @@ -165,6 +168,9 @@ .Case("F95", TY_Fortran) .Case("mii", TY_PP_ObjCXX) .Case("pcm", TY_ModuleFile) +#ifndef noCbC + .Case("cbc", TY_CbC) +#endif .Default(TY_INVALID); }
--- a/tools/clang/lib/Frontend/CompilerInvocation.cpp Fri Jun 07 20:03:58 2013 +0900 +++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp Fri Jun 14 16:49:18 2013 +0900 @@ -789,6 +789,9 @@ .Case("objective-c++-header", IK_ObjCXX) .Cases("ast", "pcm", IK_AST) .Case("ir", IK_LLVM_IR) +#ifndef noCbC + .Case("cbc", IK_C) +#endif .Default(IK_None); if (DashX == IK_None) Diags.Report(diag::err_drv_invalid_value)
--- a/tools/clang/lib/Parse/ParseStmt.cpp Fri Jun 07 20:03:58 2013 +0900 +++ b/tools/clang/lib/Parse/ParseStmt.cpp Fri Jun 14 16:49:18 2013 +0900 @@ -1642,7 +1642,7 @@ StmtResult Res; if (Tok.is(tok::identifier) && NextToken().is(tok::l_paren)) { // 'goto' codeSegment() ';' - // TODO : set code segment flag (tail call elim flag). + CorrectionCandidateCallback DefaultValidator; DefaultValidator.WantTypeSpecifiers = true; DefaultValidator.WantExpressionKeywords = true;