summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2019-02-13 22:22:48 +0000
committerLeonard Chan <leonardchan@google.com>2019-02-13 22:22:48 +0000
commitc6bc69a573077ffdfba833b34944d5494847295b (patch)
tree84df85bb797863a82a4dec6e49aa2dbac5722911 /bindings
parent5077597e0d5b86d9f9c27286d8b28f8b3645a74c (diff)
downloadllvm-c6bc69a573077ffdfba833b34944d5494847295b.tar.gz
[NewPM] Second attempt at porting ASan
This is the second attempt to port ASan to new PM after D52739. This takes the initialization requried by ASan from the Module by moving it into a separate class with it's own analysis that the new PM ASan can use. Changes: - Split AddressSanitizer into 2 passes: 1 for the instrumentation on the function, and 1 for the pass itself which creates an instance of the first during it's run. The same is done for AddressSanitizerModule. - Add new PM AddressSanitizer and AddressSanitizerModule. - Add legacy and new PM analyses for reading data needed to initialize ASan with. - Removed DominatorTree dependency from ASan since it was unused. - Move GlobalsMetadata and ShadowMapping out of anonymous namespace since the new PM analysis holds these 2 classes and will need to expose them. Differential Revision: https://reviews.llvm.org/D56470 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/go/llvm/InstrumentationBindings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/bindings/go/llvm/InstrumentationBindings.cpp b/bindings/go/llvm/InstrumentationBindings.cpp
index 316f77743443..794657fbce38 100644
--- a/bindings/go/llvm/InstrumentationBindings.cpp
+++ b/bindings/go/llvm/InstrumentationBindings.cpp
@@ -15,6 +15,7 @@
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/Transforms/Instrumentation.h"
+#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
#include "llvm/Transforms/Instrumentation/MemorySanitizer.h"
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
@@ -25,7 +26,7 @@ void LLVMAddAddressSanitizerFunctionPass(LLVMPassManagerRef PM) {
}
void LLVMAddAddressSanitizerModulePass(LLVMPassManagerRef PM) {
- unwrap(PM)->add(createAddressSanitizerModulePass());
+ unwrap(PM)->add(createModuleAddressSanitizerLegacyPassPass());
}
void LLVMAddThreadSanitizerPass(LLVMPassManagerRef PM) {