[llvm-commits] [PATCH] remove redundant 'static'
Chris Lattner
clattner at apple.com
Mon Mar 8 08:40:33 PST 2010
On Mar 8, 2010, at 4:45 AM, Zhongxing Xu wrote:
> 'static' is redundant in this context:
Um, no it's not. It prevents exporting the symbol from the .o file. What are you trying to fix?
-Chris
>
> Index: utils/TableGen/RegisterInfoEmitter.cpp
> ===================================================================
> --- utils/TableGen/RegisterInfoEmitter.cpp (版本 97892)
> +++ utils/TableGen/RegisterInfoEmitter.cpp (工作副本)
> @@ -201,7 +201,7 @@
>
> // Emit the register list now.
> OS << " // " << Name << " Register Class...\n"
> - << " static const unsigned " << Name
> + << " const unsigned " << Name
> << "[] = {\n ";
> for (unsigned i = 0, e = RC.Elements.size(); i != e; ++i) {
> Record *Reg = RC.Elements[i];
> @@ -223,7 +223,7 @@
> // Emit the register list now.
> OS << " // " << Name
> << " Register Class Value Types...\n"
> - << " static const EVT " << Name
> + << " const EVT " << Name
> << "[] = {\n ";
> for (unsigned i = 0, e = RC.VTs.size(); i != e; ++i)
> OS << getEnumName(RC.VTs[i]) << ", ";
> @@ -252,7 +252,7 @@
>
> OS << " // " << Name
> << " Sub-register Classes...\n"
> - << " static const TargetRegisterClass* const "
> + << " const TargetRegisterClass* const "
> << Name << "SubRegClasses[] = {\n ";
>
> bool Empty = true;
> @@ -298,7 +298,7 @@
>
> OS << " // " << Name
> << " Super-register Classes...\n"
> - << " static const TargetRegisterClass* const "
> + << " const TargetRegisterClass* const "
> << Name << "SuperRegClasses[] = {\n ";
>
> bool Empty = true;
> @@ -334,7 +334,7 @@
>
> OS << " // " << Name
> << " Register Class sub-classes...\n"
> - << " static const TargetRegisterClass* const "
> + << " const TargetRegisterClass* const "
> << Name << "Subclasses[] = {\n ";
>
> bool Empty = true;
> @@ -382,7 +382,7 @@
>
> OS << " // " << Name
> << " Register Class super-classes...\n"
> - << " static const TargetRegisterClass* const "
> + << " const TargetRegisterClass* const "
> << Name << "Superclasses[] = {\n ";
>
> bool Empty = true;
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list