From: Craig Topper Date: Sun, 28 May 2017 18:24:32 +0000 (+0000) Subject: [TableGen][X86] Replace a global std::vector with a regular array. llvm::find works... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3443b3b2d817a6cb4ca65637a0eacd2f50cecdbe;p=llvm [TableGen][X86] Replace a global std::vector with a regular array. llvm::find works on arrays, just need to use std::end to check the result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304095 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/X86FoldTablesEmitter.cpp b/utils/TableGen/X86FoldTablesEmitter.cpp index c2ca5734863..ca9d2cdf5fa 100644 --- a/utils/TableGen/X86FoldTablesEmitter.cpp +++ b/utils/TableGen/X86FoldTablesEmitter.cpp @@ -73,7 +73,7 @@ const ManualMapEntry ManualMapSet[] = { }; // Do not add these instructions to any of the folding tables. -const std::vector NoFoldSet = { +const char *const NoFoldSet[] = { "TCRETURNri64", "TCRETURNmi64", // Special dealing (in X86InstrCompiler.td under "TCRETURNri", // "tailcall stuff" section). @@ -645,7 +645,7 @@ void X86FoldTablesEmitter::run(raw_ostream &OS) { // class ptr_rc_tailcall, which can be of a size 32 or 64, to ensure // safe mapping of these instruction we manually map them and exclude // them from the automation. - if (find(NoFoldSet, Rec->getName().str()) != NoFoldSet.end() || + if (find(NoFoldSet, Rec->getName().str()) != std::end(NoFoldSet) || hasRSTRegClass(Inst) || hasPtrTailcallRegClass(Inst)) continue;