[PATCH] D15642: [asan] Use private aliases for global variables (LLVM part).

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 14:26:25 PST 2016

samsonov accepted this revision.
samsonov added a comment.
This revision is now accepted and ready to land.


Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1412
@@ +1411,3 @@
+      auto *GA = GlobalAlias::create(GlobalValue::InternalLinkage,
+                                     NameForGlobal + M.getName(), NewGlobal);
Side note: M.getName() might not be unique when you compile/link together a bunch of source files. It shouldn't be relevant here, as global has internal linkage.

Comment at: test/Instrumentation/AddressSanitizer/local_alias.ll:26
@@ +25,3 @@
+; Function Attrs: nounwind sanitize_address uwtable
+define i32 @main(i32 %argc, i8** %argv) #0 {
Do you actually need two functions in this test?



More information about the llvm-commits mailing list