diff options
author | Fangrui Song <maskray@google.com> | 2020-06-07 13:35:01 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-06-07 13:35:20 -0700 |
commit | b6e143aa5448bbe29da7b045072e66a31813bced (patch) | |
tree | 767f6f9d33050bfd7780e382d2dcb6314b09e2dd /llvm/lib/Analysis/StackSafetyAnalysis.cpp | |
parent | ce677ef532a5958d4bb78cf80725e2c3d13db66b (diff) | |
download | llvm-b6e143aa5448bbe29da7b045072e66a31813bced.zip llvm-b6e143aa5448bbe29da7b045072e66a31813bced.tar.gz llvm-b6e143aa5448bbe29da7b045072e66a31813bced.tar.bz2 |
Reland D80966 [codeview] Put !heapallocsite on calls to operator new
With a change to use `CGM.getCodeGenOpts().getDebugInfo() != codegenoptions::NoDebugInfo`
instead of `getDebugInfo()`,
to fix `Profile-<arch> :: instrprof-gcov-multithread_fork.test`
See CodeGenModule::CodeGenModule, `EmitGcovArcs || EmitGcovNotes` can
set `clang::CodeGen::CodeGenModule::DebugInfo`.
---
Clang marks calls to operator new as heap allocation sites, but the
operator declared at global scope returns a void pointer. There is no
explicit cast in the code, so the compiler has to write down the
allocated type itself.
Also generalize a cast to use CallBase, so that we mark heap alloc sites
when exceptions are enabled.
Differential Revision: https://reviews.llvm.org/D80966
Diffstat (limited to 'llvm/lib/Analysis/StackSafetyAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions