Skip to content

Commit

Permalink
Remove old debugging llvm::outs() calls from UnrealEnginePPTagger
Browse files Browse the repository at this point in the history
  • Loading branch information
hach-que committed Jun 26, 2024
1 parent f004a11 commit 6f0032e
Showing 1 changed file with 4 additions and 50 deletions.
54 changes: 4 additions & 50 deletions clang/lib/Lex/UnrealEnginePPTagger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,37 +57,22 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
bool IsRecognised = false;
std::vector<TokenInfo> TokensToPush;
if (MacroName == "UCLASS") {
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_uclass\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_uclass, nullptr));
IsRecognised = true;
} else if (MacroName == "USTRUCT") {
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_ustruct\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_ustruct, nullptr));
IsRecognised = true;
} else if (MacroName == "UINTERFACE") {
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_uinterface\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_uinterface, nullptr));
IsRecognised = true;
} else if (MacroName == "UPROPERTY") {
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_uproperty\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_uproperty, nullptr));
IsRecognised = true;
} else if (MacroName == "UFUNCTION") {
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_ufunction\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_ufunction, nullptr));
IsRecognised = true;
Expand Down Expand Up @@ -127,10 +112,7 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
MALFORMED();
}
if (IS_LAST() || PEEK_PP_TOKEN().getKind() == tok::TokenKind::comma) {
// This is the last standalone specifier.
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_specifier\n";
#endif
// This is the last standalone specifier.
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_specifier,
this->AllocSpecifier(SpecifierName, "")));
Expand Down Expand Up @@ -159,10 +141,7 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
CONSUME_PP_TOKEN();
}
if (PEEK_PP_TOKEN().getKind() == tok::TokenKind::identifier) {
// Value is an identifier, like a function name.
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_specifier\n";
#endif
// Value is an identifier, like a function name.
TokensToPush.push_back(TokenInfo(
tok::TokenKind::annot_unreal_specifier,
this->AllocSpecifier(
Expand All @@ -173,10 +152,7 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
tok::TokenKind::string_literal ||
PEEK_PP_TOKEN().getKind() ==
tok::TokenKind::numeric_constant) {
// Value is a string or numeric literal.
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_specifier\n";
#endif
// Value is a string or numeric literal.
TokensToPush.push_back(TokenInfo(
tok::TokenKind::annot_unreal_specifier,
this->AllocSpecifier(
Expand All @@ -187,10 +163,7 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
SKIP_PP_TOKEN(); // We used the token.
} else if (PEEK_PP_TOKEN().getKind() == tok::TokenKind::kw_true ||
PEEK_PP_TOKEN().getKind() == tok::TokenKind::kw_false) {
// Value is a boolean.
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_specifier\n";
#endif
// Value is a boolean.
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_specifier,
this->AllocSpecifier(SpecifierName,
Expand All @@ -207,9 +180,6 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
if (iequals(SpecifierName, "meta")) {
AddAsMetadata = true;
} else {
#if !defined(NDEBUG)
llvm::outs() << "[UNREAL PP] alloc: annot_unreal_specifier\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_specifier,
this->AllocSpecifier(SpecifierName, "")));
Expand All @@ -234,10 +204,6 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
PEEK_PP_TOKEN().getKind() == tok::TokenKind::r_paren) {
// This is the last standalone specifier.
if (AddAsMetadata) {
#if !defined(NDEBUG)
llvm::outs()
<< "[UNREAL PP] alloc: annot_unreal_metadata_specifier\n";
#endif
TokensToPush.push_back(
TokenInfo(tok::TokenKind::annot_unreal_metadata_specifier,
this->AllocSpecifier(MetadataName.str(), "")));
Expand Down Expand Up @@ -274,10 +240,6 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
if (PEEK_PP_TOKEN().getKind() == tok::TokenKind::identifier) {
// Value is an identifier, like a function name.
if (AddAsMetadata) {
#if !defined(NDEBUG)
llvm::outs()
<< "[UNREAL PP] alloc: annot_unreal_metadata_specifier\n";
#endif
TokensToPush.push_back(TokenInfo(
tok::TokenKind::annot_unreal_metadata_specifier,
this->AllocSpecifier(
Expand All @@ -291,10 +253,6 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
tok::TokenKind::numeric_constant) {
// Value is a string or numeric literal.
if (AddAsMetadata) {
#if !defined(NDEBUG)
llvm::outs()
<< "[UNREAL PP] alloc: annot_unreal_metadata_specifier\n";
#endif
TokensToPush.push_back(TokenInfo(
tok::TokenKind::annot_unreal_metadata_specifier,
this->AllocSpecifier(
Expand All @@ -309,10 +267,6 @@ void UnrealEnginePPTagger::MacroExpands(const Token &MacroNameTok,
PEEK_PP_TOKEN().getKind() == tok::TokenKind::kw_false) {
// Value is a boolean.
if (AddAsMetadata) {
#if !defined(NDEBUG)
llvm::outs()
<< "[UNREAL PP] alloc: annot_unreal_metadata_specifier\n";
#endif
TokensToPush.push_back(TokenInfo(
tok::TokenKind::annot_unreal_metadata_specifier,
this->AllocSpecifier(MetadataName.str(),
Expand Down

0 comments on commit 6f0032e

Please sign in to comment.