[PATCH] Move asan-coverage into a separate phase.
Kostya Serebryany
kcc at google.com
Tue Nov 11 13:48:44 PST 2014
================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:114
@@ +113,3 @@
+ return F;
+ FuncOrBitcast->dump();
+ report_fatal_error("SanitizerCoverage interface function redefined");
----------------
nlewycky wrote:
> Please roll this into the report_fatal_error string. (LLVM is a library, may not have stdout, etc.)
done
std::string Err;
raw_string_ostream Stream(Err);
Stream << "SanitizerCoverage interface function redefined: "
<< *FuncOrBitcast;
report_fatal_error(Err);
================
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());
----------------
nlewycky wrote:
> DataLayoutPass *DLP = &getAnalysis<DataLayoutPass>();
done.
Also added
AU.addRequired<DataLayoutPass>();
to
getAnalysisUsage()
================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:141
@@ +140,3 @@
+
+ for (auto &F: M)
+ runOnFunction(F);
----------------
nlewycky wrote:
> Space before the colon.
done
================
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.
----------------
nlewycky wrote:
> Typo: initialed -> initialized
done
http://reviews.llvm.org/D6152
More information about the llvm-commits
mailing list