diff options
author | Reid Kleckner <rnk@google.com> | 2016-11-16 16:50:43 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-11-16 16:50:43 +0000 |
commit | 3a83e76811d7d8b8a4bfd45943dbd89cb08ee522 (patch) | |
tree | 4a18c408353ea376fc20057eb3684e0c5381c82e /llvm/lib/Transforms/Instrumentation | |
parent | e870398e48baf31321de4bd16f83a51becb1c7b9 (diff) | |
download | bcm5719-llvm-3a83e76811d7d8b8a4bfd45943dbd89cb08ee522.tar.gz bcm5719-llvm-3a83e76811d7d8b8a4bfd45943dbd89cb08ee522.zip |
[sancov] Name the global containing the main source file name
If the global name doesn't start with __sancov_gen, ASan will insert
unecessary red zones around it.
llvm-svn: 287117
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index 031effb4060..730e28a7f91 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -357,9 +357,9 @@ bool SanitizerCoverageModule::runOnModule(Module &M) { // Create variable for module (compilation unit) name Constant *ModNameStrConst = ConstantDataArray::getString(M.getContext(), M.getName(), true); - GlobalVariable *ModuleName = - new GlobalVariable(M, ModNameStrConst->getType(), true, - GlobalValue::PrivateLinkage, ModNameStrConst); + GlobalVariable *ModuleName = new GlobalVariable( + M, ModNameStrConst->getType(), true, GlobalValue::PrivateLinkage, + ModNameStrConst, "__sancov_gen_modname"); if (Options.TracePCGuard) { if (HasSancovGuardsSection) { Function *CtorFunc; |