OSDN Git Service

Implement review feedback .. don't double search a set.
authorReid Spencer <rspencer@reidspencer.com>
Thu, 12 Apr 2007 21:57:15 +0000 (21:57 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 12 Apr 2007 21:57:15 +0000 (21:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35957 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp

index 8f053a6..91b5557 100644 (file)
@@ -45,7 +45,6 @@
 #include "llvm/Config/config.h"
 #include <algorithm>
 #include <sstream>
-// #include <set>
 using namespace llvm;
 
 namespace {
@@ -2430,11 +2429,10 @@ void CWriter::lowerIntrinsics(Function &F) {
   std::vector<Function*>::iterator I = prototypesToGen.begin();
   std::vector<Function*>::iterator E = prototypesToGen.end();
   for ( ; I != E; ++I) {
-    if (intrinsicPrototypesAlreadyGenerated.count(*I) == 0) {
+    if (intrinsicPrototypesAlreadyGenerated.insert(*I).second) {
       Out << '\n';
       printFunctionSignature(*I, true);
       Out << ";\n";
-      intrinsicPrototypesAlreadyGenerated.insert(*I);
     }
   }
 }