This revision was automatically updated to reflect the committed changes. Closed by commit rL366143: [OpenCL] Make TableGen'd builtin tables and helper functions static (authored by tstellar, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D64608?vs=209383&id=209975#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64608/new/ https://reviews.llvm.org/D64608 Files: cfe/trunk/lib/Sema/SemaLookup.cpp cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp Index: cfe/trunk/lib/Sema/SemaLookup.cpp =================================================================== --- cfe/trunk/lib/Sema/SemaLookup.cpp +++ cfe/trunk/lib/Sema/SemaLookup.cpp @@ -688,7 +688,7 @@ unsigned Len) { for (unsigned i = 0; i < Len; ++i) { - OpenCLBuiltinDecl &Decl = OpenCLBuiltins[Index - 1 + i]; + const OpenCLBuiltinDecl &Decl = OpenCLBuiltins[Index - 1 + i]; ASTContext &Context = S.Context; // Ignore this BIF if the version is incorrect. Index: cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp =================================================================== --- cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp +++ cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp @@ -207,7 +207,7 @@ } void BuiltinNameEmitter::EmitSignatureTable() { - OS << "OpenCLType OpenCLSignature[] = {\n"; + OS << "static const OpenCLType OpenCLSignature[] = {\n"; for (auto &P : SignatureSet) { OS << "// " << P.second << "\n"; for (Record *R : P.first) { @@ -222,7 +222,7 @@ } void BuiltinNameEmitter::EmitBuiltinTable() { - OS << "OpenCLBuiltinDecl OpenCLBuiltins[] = {\n"; + OS << "static const OpenCLBuiltinDecl OpenCLBuiltins[] = {\n"; for (auto &i : OverloadInfo) { StringRef Name = i.first; OS << "// " << Name << "\n"; @@ -255,7 +255,7 @@ OS << R"( // Return 0 if name is not a recognized OpenCL builtin, or an index // into a table of declarations if it is an OpenCL builtin. -std::pair<unsigned, unsigned> isOpenCLBuiltin(llvm::StringRef name) { +static std::pair<unsigned, unsigned> isOpenCLBuiltin(llvm::StringRef name) { )";
Index: cfe/trunk/lib/Sema/SemaLookup.cpp =================================================================== --- cfe/trunk/lib/Sema/SemaLookup.cpp +++ cfe/trunk/lib/Sema/SemaLookup.cpp @@ -688,7 +688,7 @@ unsigned Len) { for (unsigned i = 0; i < Len; ++i) { - OpenCLBuiltinDecl &Decl = OpenCLBuiltins[Index - 1 + i]; + const OpenCLBuiltinDecl &Decl = OpenCLBuiltins[Index - 1 + i]; ASTContext &Context = S.Context; // Ignore this BIF if the version is incorrect. Index: cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp =================================================================== --- cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp +++ cfe/trunk/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp @@ -207,7 +207,7 @@ } void BuiltinNameEmitter::EmitSignatureTable() { - OS << "OpenCLType OpenCLSignature[] = {\n"; + OS << "static const OpenCLType OpenCLSignature[] = {\n"; for (auto &P : SignatureSet) { OS << "// " << P.second << "\n"; for (Record *R : P.first) { @@ -222,7 +222,7 @@ } void BuiltinNameEmitter::EmitBuiltinTable() { - OS << "OpenCLBuiltinDecl OpenCLBuiltins[] = {\n"; + OS << "static const OpenCLBuiltinDecl OpenCLBuiltins[] = {\n"; for (auto &i : OverloadInfo) { StringRef Name = i.first; OS << "// " << Name << "\n"; @@ -255,7 +255,7 @@ OS << R"( // Return 0 if name is not a recognized OpenCL builtin, or an index // into a table of declarations if it is an OpenCL builtin. -std::pair<unsigned, unsigned> isOpenCLBuiltin(llvm::StringRef name) { +static std::pair<unsigned, unsigned> isOpenCLBuiltin(llvm::StringRef name) { )";
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits