Mercurial > hg > CbC > CbC_llvm
changeset 229:cf4f212398d7
disable prototype generation
author | kono |
---|---|
date | Mon, 19 Jul 2021 09:08:46 +0900 |
parents | c2fc9aeb158b |
children | 9e61cd3a874d |
files | clang/lib/Parse/ParseCbC.cpp clang/lib/Parse/Parser.cpp |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/clang/lib/Parse/ParseCbC.cpp Mon Jul 19 06:59:53 2021 +0900 +++ b/clang/lib/Parse/ParseCbC.cpp Mon Jul 19 09:08:46 2021 +0900 @@ -1076,11 +1076,15 @@ } bool Parser::NeedPrototypeDeclaration(Token IITok){ +#if 0 + // if we allo unprototyped code segment LookupResult LR(Actions, IITok.getIdentifierInfo(), IITok.getLocation(), Actions.LookupOrdinaryName); CXXScopeSpec SS; Actions.LookupParsedName(LR, getCurScope(), &SS, !(Actions.getCurMethodDecl())); return (LR.getResultKind() == LookupResult::NotFound); +#endif + return false; } /// CreatePrototypeDeclaration - Create prototype declaration by it's definition.
--- a/clang/lib/Parse/Parser.cpp Mon Jul 19 06:59:53 2021 +0900 +++ b/clang/lib/Parse/Parser.cpp Mon Jul 19 09:08:46 2021 +0900 @@ -1382,7 +1382,10 @@ ParseLexedAttributeList(*LateParsedAttrs, Res, false, true); #ifndef noCbC - curFuncName = D.getIdentifier()->getName().data(); + curFuncName = "__cbc_"; + if (D.getIdentifier()) { + curFuncName = D.getIdentifier()->getName().data(); + } #endif return ParseFunctionStatementBody(Res, BodyScope); }