[PATCH] Adding diversity for security
    David Majnemer 
    david.majnemer at gmail.com
       
    Tue Oct  1 15:55:15 PDT 2013
    
    
  
  Surface review comments.
================
Comment at: lib/Frontend/CompilerInvocation.cpp:1374
@@ -1369,1 +1373,3 @@
 
+
+
----------------
Please remove this whitespace.
================
Comment at: tools/driver/cc1_main.cpp:115
@@ +114,3 @@
+    }
+  }
+  llvm::RandomNumberGenerator::EntropyData = seeddata;
----------------
Please try to follow our coding conventions here.
Pointer should be on the right.
seeddata -> SeedData
llvm::StringRef might make this a bit easier to read.
Something like:
```
  std::string SeedData;
  for (const char **i = ArgBegin; i != ArgEnd; ++i) {
    // tmjackso: Skip the -o option because clang (and GCC) generate a
    // random temp file to hold a compiled object if one isn't
    // specified.  This happens if you combine compilation and linking
    // into one step.  There may be a cleaner way of doing this, but
    // this is explicit and obvious.
    if (llvm::StringRef(*i) == "-o")
      ++i;
    else
      // Concatenate options for seeding.
      seeddata.append(*i);
  }
http://llvm-reviews.chandlerc.com/D1803
    
    
More information about the cfe-commits
mailing list