diff options
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 2d5eb0ac4e2..906de7e4fda 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -256,7 +256,9 @@ class GlobalsMetadata { NamedMDNode *Globals = M.getNamedMetadata("llvm.asan.globals"); if (!Globals) return; - for (auto MDN : Globals->operands()) { + for (const Value *MDV : Globals->operands()) { + const MDNode *MDN = cast<MDNode>(MDV); + // Metadata node contains the global and the fields of "Entry". assert(MDN->getNumOperands() == 5); Value *V = MDN->getOperand(0); |

