[llvm-commits] [llvm] r103071 - in /llvm/trunk/utils/TableGen: CMakeLists.txt ClangASTNodesEmitter.cpp ClangASTNodesEmitter.h Makefile TableGen.cpp
Chris Lattner
clattner at apple.com
Tue May 4 22:05:28 PDT 2010
On May 4, 2010, at 9:13 PM, Sean Hunt wrote:
> Author: coppro
> Date: Tue May 4 23:13:08 2010
> New Revision: 103071
>
> URL: http://llvm.org/viewvc/llvm-project?rev=103071&view=rev
> Log:
> Add an emitter to handle the list of clang statement nodes.
Thanks for working on this.
> +++ llvm/trunk/utils/TableGen/ClangASTNodesEmitter.cpp Tue May 4 23:13:08 2010
> @@ -0,0 +1,126 @@
> +#include "ClangASTNodesEmitter.h"
This file needs a header comment.
> +#include "Record.h"
> +#include <vector>
> +#include <stack>
> +#include <string>
> +#include <map>
> +#include <utility>
> +#include <clocale>
Please trim this. You certainly don't need <stack>, probably don't need others.
> +using namespace llvm;
> +
> +//===----------------------------------------------------------------------===//
> +// Statement Node Tables (.inc file) generation.
> +//===----------------------------------------------------------------------===//
> +
> +// Sort to create a tree-like structure based on the 'Base' field.
> +namespace {
> + // Create a macro-ized version of a name
> + std::string macroName(std::string S) {
> + for (unsigned i = 0; i < S.size(); ++i)
> + S[i] = std::toupper(S[i]);
> +
> + return S;
> + }
Please follow:
http://llvm.org/docs/CodingStandards.html#micro_anonns
> + OS << "#undef ABSTRACT\n";
> +}
> \ No newline at end of file
Please add newline.
> +++ llvm/trunk/utils/TableGen/ClangASTNodesEmitter.h Tue May 4 23:13:08 2010
> @@ -0,0 +1,36 @@
> +//===- ClangDiagnosticsEmitter.h - Generate Clang diagnostics tables -*- C++ -*-
> +//
> +// The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +//
> +// These tablegen backends emit Clang diagnostics tables.
Please update this header comment.
-Chris
More information about the llvm-commits
mailing list