[PATCH] D36810: Minimal runtime for UBSan.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 19:23:04 PDT 2017


pcc added inline comments.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:2713
       ("__ubsan_handle_" + CheckName +
-       (CheckInfo.Version ? "_v" + llvm::utostr(CheckInfo.Version) : "") +
-       (NeedsAbortSuffix ? "_abort" : ""))
+       ((CheckInfo.Version && !MinimalRuntime)
+            ? "_v" + llvm::utostr(CheckInfo.Version)
----------------
Now that we have three of these I think it would be more readable to change this to:
```if (CheckInfo.Version && !MinimalRuntime)
  FnName += "_v" + llvm::utostr(CheckInfo.Version);```
and similarly below.


================
Comment at: compiler-rt/lib/CMakeLists.txt:37
     add_subdirectory(ubsan)
+    add_subdirectory(ubsan_minimal)
   endif()
----------------
Instead of adding this here it looks like the new way is to add the runtime to `ALL_SANITIZERS`.


https://reviews.llvm.org/D36810





More information about the llvm-commits mailing list