[PATCH] D20542: [esan|cfrag] Handle the cfrag variable passed to the runtime

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 07:09:34 PDT 2016

filcab added a subscriber: filcab.

Comment at: lib/esan/cache_frag.cpp:22
@@ +21,3 @@
+struct CacheFragTy {
+  ToolType WhichTool;
+  const char *UnitName;
Same as D20541: No need passing `ToolType` in the struct, since we're passing it to `__esan_init`

Comment at: lib/esan/cache_frag.cpp:30
@@ +29,3 @@
+  CacheFragTy *CacheFrag = (CacheFragTy *)Ptr;
+  if (CacheFrag->WhichTool != WhichTool)
+    return;
Same as above. If we get here and this test fails, then we should have failed on an `__esan_init` call.


More information about the llvm-commits mailing list