[PATCH] Move asan-coverage into a separate phase.

Nick Lewycky nlewycky at google.com
Mon Nov 10 16:32:10 PST 2014


================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:114
@@ +113,3 @@
+     return F;
+  FuncOrBitcast->dump();
+  report_fatal_error("SanitizerCoverage interface function redefined");
----------------
Please roll this into the report_fatal_error string. (LLVM is a library, may not have stdout, etc.)

================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:121-123
@@ +120,5 @@
+  C = &(M.getContext());
+  DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
+  if (!DLP)
+    report_fatal_error("data layout missing");
+  IntptrTy = Type::getIntNTy(*C, DLP->getDataLayout().getPointerSizeInBits());
----------------
DataLayoutPass *DLP = &getAnalysis<DataLayoutPass>();

================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:141
@@ +140,3 @@
+
+  for (auto &F: M)
+    runOnFunction(F);
----------------
Space before the colon.

================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:190
@@ +189,3 @@
+//   - callee address,
+//   - global cache array that contains kCacheSize pointers (zero-initialed).
+//     The cache is used to speed up recording the caller-callee pairs.
----------------
Typo: initialed -> initialized

http://reviews.llvm.org/D6152






More information about the llvm-commits mailing list